Make it compile.

This commit is contained in:
Martijn Laan 2016-02-07 12:36:38 +01:00
parent 96c253ef65
commit c87ec25e23
8 changed files with 56 additions and 6 deletions

View File

@ -1194,6 +1194,14 @@ begin
RecreateWnd;
end;
function GetSystemDir: String;
var
Buf: array[0..MAX_PATH-1] of Char;
begin
GetSystemDirectory(Buf, SizeOf(Buf) div SizeOf(Buf[0]));
Result := StrPas(Buf);
end;
initialization
InitThemeLibrary;
SHPathPrepareForWriteFunc := GetProcAddress(LoadLibrary(PChar(AddBackslash(GetSystemDir) + shell32)),

View File

@ -204,7 +204,8 @@ procedure Register;
implementation
uses
TmSchemaISX, {$IFDEF DELPHI2} Ole2 {$ELSE} ActiveX {$ENDIF}, BidiUtils{$IFDEF DELPHI2009}, Types{$ENDIF};
TmSchemaISX, PathFunc, {$IFDEF DELPHI2} Ole2 {$ELSE} ActiveX {$ENDIF},
BidiUtils{$IFDEF DELPHI2009}, Types{$ENDIF};
const
sRadioCantHaveDisabledChildren = 'Radio item cannot have disabled child items';
@ -353,11 +354,20 @@ var
const riidInterface: TGUID; var ppvObject: Pointer): HRESULT; stdcall;
function InitializeOleAcc: Boolean;
function GetSystemDir: String;
var
Buf: array[0..MAX_PATH-1] of Char;
begin
GetSystemDirectory(Buf, SizeOf(Buf) div SizeOf(Buf[0]));
Result := StrPas(Buf);
end;
var
M: HMODULE;
begin
if not OleAccInited then begin
M := LoadLibrary(AddBackslash(GetSystemDir) + 'oleacc.dll');
M := LoadLibrary(PChar(AddBackslash(GetSystemDir) + 'oleacc.dll'));
if M <> 0 then begin
LresultFromObjectFunc := GetProcAddress(M, 'LresultFromObject');
CreateStdAccessibleObjectFunc := GetProcAddress(M, 'CreateStdAccessibleObject');

View File

@ -107,6 +107,9 @@ implementation
//----------------------------------------------------------------------------------------------------------------------
uses
SysUtils, PathFunc;
const
restartmanagerlib = 'Rstrtmgr.dll';
@ -136,6 +139,15 @@ end;
//----------------------------------------------------------------------------------------------------------------------
function InitRestartManagerLibrary: Boolean;
function GetSystemDir: String;
var
Buf: array[0..MAX_PATH-1] of Char;
begin
GetSystemDirectory(Buf, SizeOf(Buf) div SizeOf(Buf[0]));
Result := StrPas(Buf);
end;
begin
Inc(ReferenceCount);

View File

@ -49,7 +49,7 @@ procedure Register;
implementation
uses
RichEdit, ShellApi, BidiUtils;
RichEdit, ShellApi, BidiUtils, PathFunc;
const
{ Note: There is no 'W' 1.0 class }
@ -82,6 +82,15 @@ var
RichEditVersion: Integer;
procedure LoadRichEdit;
function GetSystemDir: String;
var
Buf: array[0..MAX_PATH-1] of Char;
begin
GetSystemDirectory(Buf, SizeOf(Buf) div SizeOf(Buf[0]));
Result := StrPas(Buf);
end;
begin
if RichEditUseCount = 0 then begin
{$IFDEF UNICODE}

View File

@ -1013,6 +1013,9 @@ implementation
//----------------------------------------------------------------------------------------------------------------------
uses
SysUtils, PathFunc;
const
themelib = 'uxtheme.dll';
@ -1098,6 +1101,14 @@ function InitThemeLibrary: Boolean;
Result := True;
end;
function GetSystemDir: String;
var
Buf: array[0..MAX_PATH-1] of Char;
begin
GetSystemDirectory(Buf, SizeOf(Buf) div SizeOf(Buf[0]));
Result := StrPas(Buf);
end;
begin
Inc(ReferenceCount);

View File

@ -1669,7 +1669,7 @@ var
M: HMODULE;
begin
if not SHAutoCompleteInitialized then begin
M := SafeLoadLibrary(AddBackslash(GetSystemDir) + 'shlwapi.dll'),
M := SafeLoadLibrary(AddBackslash(GetSystemDir) + 'shlwapi.dll',
SEM_NOOPENFILEERRORBOX);
if M <> 0 then
SHAutoCompleteFunc := GetProcAddress(M, 'SHAutoComplete');

View File

@ -46,7 +46,7 @@ procedure FreeHtmlHelpLibrary;
implementation
uses
Messages, SysUtils;
Messages, SysUtils, CmnFunc2, PathFunc;
var
HHCtrl: THandle;

View File

@ -104,7 +104,7 @@ type
implementation
uses
CmnFunc2;
CmnFunc2, PathFunc;
var
Wow64DisableWow64FsRedirectionFunc: function(var OldValue: Pointer): BOOL; stdcall;