From 25ec54ea27a7099f33573b260a620ed7273176fe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Jun 2013 12:16:44 +0000 Subject: - db_set_blob used everywhere for writing blobs - DBCONTACTWRITESETTING left only in the event handlers git-svn-id: http://svn.miranda-ng.org/main/trunk@5191 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryPlusPlus/hpp_database.pas | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'plugins/HistoryPlusPlus') diff --git a/plugins/HistoryPlusPlus/hpp_database.pas b/plugins/HistoryPlusPlus/hpp_database.pas index 4341fa64e2..38f307c6ed 100644 --- a/plugins/HistoryPlusPlus/hpp_database.pas +++ b/plugins/HistoryPlusPlus/hpp_database.pas @@ -177,14 +177,8 @@ begin end; function WriteDBInt(const hContact: THandle; const Module,Param: AnsiString; Value: Integer): Integer; -var - cws: TDBCONTACTWRITESETTING; begin - cws.szModule := PAnsiChar(Module); - cws.szSetting := PAnsiChar(Param); - cws.value._type := DBVT_DWORD; - cws.value.dVal := Value; - Result := CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws)); + Result := db_set_dw(hContact, PAnsiChar(Module), PAnsiChar(Param), Value); end; function WriteDBStr(const Module,Param: AnsiString; const Value: AnsiString): Integer; @@ -208,14 +202,8 @@ begin end; function DBWriteContactSettingWideString(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; const val: PWideChar): Integer; -var - cws: TDBCONTACTWRITESETTING; begin - cws.szModule := szModule; - cws.szSetting := szSetting; - cws.value._type := DBVT_WCHAR; - cws.value.szVal.w := val; - Result := CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws)); + Result := db_set_ws(hContact, szModule, szSetting, val); end; function WriteDBBlob(const Module,Param: AnsiString; Value: Pointer; Size: Integer): Integer; @@ -224,16 +212,8 @@ begin end; function WriteDBBlob(const hContact: THandle; const Module,Param: AnsiString; Value: Pointer; Size: Integer): Integer; -var - cws: TDBContactWriteSetting; -begin - ZeroMemory(@cws,SizeOf(cws)); - cws.szModule := PAnsiChar(Module); - cws.szSetting := PAnsiChar(Param); - cws.value._type := DBVT_BLOB; - cws.value.pbVal := Value; - cws.value.cpbVal := Word(Size); - Result := CallService(MS_DB_CONTACT_WRITESETTING,hContact,lParam(@cws)); +begin + Result := db_set_blob(hContact, PAnsiChar(Module), PAnsiChar(Param), Value, Size); end; function WriteDBDateTime(const hContact: THandle; const Module,Param: AnsiString; Value: TDateTime): Integer; overload; -- cgit v1.2.3