UPD: Silence some compiler warnings.

This commit is contained in:
cobines 2011-02-10 22:37:16 +00:00
commit 36509bee2f
6 changed files with 24 additions and 13 deletions

View file

@ -559,16 +559,16 @@ end;
function DriveSupportsSymlinks(const fn: WideString): Boolean;
var
disk: PAnsiChar;
buf1, buf2: array[0..50] of AnsiChar;
disk: WideString;
buf1, buf2: array[0..50] of WideChar;
Serial, NameLen, Flags: DWORD;
begin
Result:= False;
if (fn = '') or (Pos(':\', fn) <> 2) then Exit;
disk:= PAnsiChar(fn[1]);
disk := fn[1] + ':\';
FillChar(buf1, SizeOf(buf1), 0);
FillChar(buf2, SizeOf(buf2), 0);
if GetVolumeInformation(PAnsiChar(disk + ':\'), @buf1, SizeOf(buf1),
if GetVolumeInformationW(PWideChar(disk), @buf1, SizeOf(buf1),
@Serial, NameLen, Flags, @buf2, SizeOf(buf2)) then
Result:= (Flags and FILE_SUPPORTS_REPARSE_POINTS) <> 0;
end;

View file

@ -37,8 +37,10 @@ implementation
var
wcFakeWndClass: TWndClassEx;
hMainWindow,
//hMainWindow,
{$IFDEF DEBUG}
hFakeWindow: HWND;
{$ENDIF}
function WindowProc(hWnd: HWND; uiMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
begin
@ -63,7 +65,7 @@ end;
procedure CreateTotalCommanderWindow(hWindow: HWND);
begin
hMainWindow:= hWindow;
// hMainWindow:= hWindow;
FillByte(wcFakeWndClass, SizeOf(wcFakeWndClass), 0);
wcFakeWndClass.cbSize:= SizeOf (wcFakeWndClass);
wcFakeWndClass.Style:= CS_HREDRAW or CS_VREDRAW;
@ -74,7 +76,10 @@ begin
wcFakeWndClass.lpszClassName:= 'TTOTAL_CMD';
RegisterClassEx(wcFakeWndClass);
// Create Total Commander fake window
hFakeWindow:= CreateWindowEx(0, 'TTOTAL_CMD', 'Double Commander', WS_OVERLAPPEDWINDOW, 100, 100, 300, 300, 0, 0, hInstance, nil);
{$IFDEF DEBUG}
hFakeWindow:=
{$ENDIF}
CreateWindowEx(0, 'TTOTAL_CMD', 'Double Commander', WS_OVERLAPPEDWINDOW, 100, 100, 300, 300, 0, 0, hInstance, nil);
{$IFDEF DEBUG}
// Show window (for debugging only)
ShowWindow(hFakeWindow, SW_SHOW);

View file

@ -186,9 +186,9 @@ var
Bytes: Integer;
begin
iRgbTable := 0;
getMem(BitmapInfo,SizeOf(BitmapInfo^.bmiHeader));
getMem(BitmapInfo,SizeOf(TBitmapInfo.bmiHeader));
try
FillChar(BitmapInfo^.bmiHeader,sizeof(BitmapInfo^.bmiHeader),0);
FillChar(BitmapInfo^.bmiHeader,sizeof(TBitmapInfo.bmiHeader),0);
with BitmapInfo^ do
begin
DS.dsbmih.biSize := 0;

View file

@ -129,7 +129,7 @@ function GetFileDescription(const sPath: String): String;
implementation
uses
LCLProc, ShellAPI, MMSystem, JwaWinNetWk, uShlObjAdditional;
ShellAPI, MMSystem, JwaWinNetWk, uShlObjAdditional;
function mciSendCommand(IDDevice: MCIDEVICEID; uMsg: UINT; fdwCommand: DWORD; dwParam: DWORD_PTR): MCIERROR; stdcall; external 'winmm.dll' name 'mciSendCommandA';
@ -144,7 +144,7 @@ begin
begin
cbSize:= SizeOf(TMenuItemInfoW);
fMask:= MIIM_FTYPE or MIIM_STRING;
dwTypeData:= wca;
dwTypeData:= @wca[0];
cch:= MAX_PATH;
end;
if GetMenuItemInfoW(hMenu, uItem, fByPosition, @miiw) then
@ -511,4 +511,4 @@ begin
end;
end.

View file

@ -451,7 +451,7 @@ begin
begin
cbSize := sizeof(cmici);
hwnd := FParent.Handle;
lpVerb := PChar(cmd - 1);
lpVerb := PChar(PtrUInt(cmd - 1));
nShow := SW_NORMAL;
end;
OleCheckUTF8(FShellMenu1.InvokeCommand(cmici));

View file

@ -57,6 +57,7 @@ type
function SetCurrentDir(const NewDir: UTF8String): Boolean; override;
//---------------------
function KillShell: LongInt; override;
function CSI_GetTaskId(const buf:UTF8string):integer; override;
end;
{ TWinConThread }
@ -232,6 +233,11 @@ begin
end;
end;
function TWinTerm.CSI_GetTaskId(const buf:UTF8string):integer;
begin
Result := 0; // Dummy
end;
{ TWinConThread }
procedure TWinConThread.AddSymbol;