From d7b0d653bd0e9120db1fe92cd36d1db128c447d2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 9 Oct 2012 20:10:07 +0000 Subject: compilation fix for ImportTXT git-svn-id: http://svn.miranda-ng.org/main/trunk@1850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ImportTXT/FileDlgs.pas | 8 ++++---- plugins/Libs/KOLEdb.pas | 16 +++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'plugins') diff --git a/plugins/ImportTXT/FileDlgs.pas b/plugins/ImportTXT/FileDlgs.pas index 59e65895b1..e05edf5fb5 100644 --- a/plugins/ImportTXT/FileDlgs.pas +++ b/plugins/ImportTXT/FileDlgs.pas @@ -13,7 +13,7 @@ uses shlobj, activex, SysUtils, CommDlg; function OpenDialogExecute(hDlg:hWnd; flg:cardinal; var nFO:integer; const DefExt:string):WideString; //Диалог открытия файла var - OpenFilename:TOpenFilenameW; + OpenFilename:OpenFilenameW; TempFilename:WideString; Temp1,Temp2:WideString; res:bool; @@ -36,7 +36,7 @@ begin lpstrTitle:=PWideChar(Temp2); Flags:=flg or OFN_EXPLORER or OFN_ENABLESIZING or OFN_PATHMUSTEXIST or OFN_FILEMUSTEXIST or OFN_NOCHANGEDIR; end; - res:=GetOpenFileNameW(OpenFileName); + res:=GetOpenFileNameW(@OpenFileName); if res then begin Result:=TempFilename; @@ -65,7 +65,7 @@ end; function SelectDirectory(Caption:PWideChar;var Directory:PWideChar; Parent:HWND=0;newstyle:bool=false):Boolean; var - BrowseInfo:TBrowseInfoW; + BrowseInfo:BrowseInfoW; Buffer:array [0..MAX_PATH-1] of WideChar; ItemIDList:PItemIDList; ShellMalloc:IMalloc; @@ -85,7 +85,7 @@ begin if CoInitializeEx(nil,COINIT_APARTMENTTHREADED)<>RPC_E_CHANGED_MODE then BrowseInfo.ulFlags:=BrowseInfo.ulFlags or BIF_NEWDIALOGSTYLE; try - ItemIDList:=ShBrowseForFolderW(BrowseInfo); + ItemIDList:=ShBrowseForFolderW(@BrowseInfo); Result:=ItemIDList<>nil; if Result then begin diff --git a/plugins/Libs/KOLEdb.pas b/plugins/Libs/KOLEdb.pas index 4744adc832..53357ab44f 100644 --- a/plugins/Libs/KOLEdb.pas +++ b/plugins/Libs/KOLEdb.pas @@ -11,7 +11,7 @@ unit KOLEdb; interface -uses Windows, ActiveX, KOL, err; +uses Windows, ActiveX, KOL; type INT64 = I64; @@ -33,7 +33,7 @@ type //7: ( cyVal : CY ); //8: ( date : Date ); 9: ( bstrVal : Pointer ); // BSTR => [ Len: Integer; array[ 1..Len ] of WideChar ] - 10:( pdecVal : ^Decimal ); + //10:( pdecVal : ^Decimal ); end; (* @@ -95,7 +95,7 @@ type PIUnknown = ^IUnknown; PUintArray = ^TUintArray; TUintArray = array[0..MAXBOUND] of UINT; - + HROW = UINT; PHROW = ^HROW; PPHROW = ^PHROW; @@ -141,7 +141,7 @@ const DBGUID_DBSQL : TGUID = '{C8B521FB-5CF3-11CE-ADE5-00AA0044773D}'; DBGUID_DEFAULT : TGUID = '{C8B521FB-5CF3-11CE-ADE5-00AA0044773D}'; DBGUID_SQL : TGUID = '{C8B522D7-5CF3-11CE-ADE5-00AA0044773D}'; - + DBPROPSET_ROWSET : TGUID = '{C8B522BE-5CF3-11CE-ADE5-00AA0044773D}'; DB_S_ENDOFROWSET = $00040EC6; @@ -680,7 +680,7 @@ type function StartTransaction(isoLevel: Integer; isoFlags: UINT; const pOtherOptions: ITransactionOptions; pulTransactionLevel: PUINT): HResult; stdcall; end; - + const XACTTC_SYNC_PHASEONE = $00000001; XACTTC_SYNC_PHASETWO = $00000002; @@ -1067,7 +1067,9 @@ end; *) procedure DummyOleError( Result: HResult ); begin + {$IFNDEF FPC} raise Exception.Create( e_Custom, 'OLE DB error ' + Int2Hex( Result, 8 ) ); + {$ENDIF} end; function CheckOLE( Rslt: HResult ): Boolean; @@ -1160,7 +1162,7 @@ begin if Assigned(Unk) then begin CheckOLE(Unk.QueryInterface(IID_ITransaction,Result.fTransaction)); CheckOLE(Unk.QueryInterface(IID_ITransactionLocal,Result.fTransactionLocal)); - end; + end; end; // ================================================================================================= end; @@ -1350,7 +1352,7 @@ begin if fRowBuffers.Items[ fCurIndex ] = nil then begin GetMem( Buffer, fRowSize ); - FillChar( Buffer^, fRowSize, 0 ); //fixup the varnumberic random bytes by azsd + FillChar( Buffer^, fRowSize, 0 ); //fixup the varnumberic random bytes by azsd fRowBuffers.Items[ fCurIndex ] := Buffer; CheckOLE( fRowSet.GetData( fRowHandle, fAccessor, fRowBuffers.Items[ fCurIndex ] ) ); end; -- cgit v1.2.3