Skip to content

Commit

Permalink
Make it compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Feb 7, 2016
1 parent 96c253e commit c87ec25
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Components/FolderTreeView.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,14 @@ procedure TStartMenuFolderTreeView.SetPaths(const AUserPrograms, ACommonPrograms
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)),
Expand Down
14 changes: 12 additions & 2 deletions Components/NewCheckListBox.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -353,11 +354,20 @@ function CoDisconnectObject(unk: TIUnknown; dwReserved: DWORD): HRESULT;
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');
Expand Down
12 changes: 12 additions & 0 deletions Components/RestartManager.pas
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ implementation

//----------------------------------------------------------------------------------------------------------------------

uses
SysUtils, PathFunc;

const
restartmanagerlib = 'Rstrtmgr.dll';

Expand Down Expand Up @@ -136,6 +139,15 @@ procedure FreeRestartManagerLibrary;
//----------------------------------------------------------------------------------------------------------------------

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);

Expand Down
11 changes: 10 additions & 1 deletion Components/RichEditViewer.pas
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ procedure Register;
implementation

uses
RichEdit, ShellApi, BidiUtils;
RichEdit, ShellApi, BidiUtils, PathFunc;

const
{ Note: There is no 'W' 1.0 class }
Expand Down Expand Up @@ -82,6 +82,15 @@ TTextRange = record
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}
Expand Down
11 changes: 11 additions & 0 deletions Components/UxThemeISX.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,9 @@ implementation

//----------------------------------------------------------------------------------------------------------------------

uses
SysUtils, PathFunc;

const
themelib = 'uxtheme.dll';

Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion Projects/CmnFunc2.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ procedure TryEnableAutoCompleteFileSystem(Wnd: HWND);
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');
Expand Down
2 changes: 1 addition & 1 deletion Projects/HtmlHelpFunc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ procedure FreeHtmlHelpLibrary;
implementation

uses
Messages, SysUtils;
Messages, SysUtils, CmnFunc2, PathFunc;

var
HHCtrl: THandle;
Expand Down
2 changes: 1 addition & 1 deletion Projects/RedirFunc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ TTextFileWriterRedir = class(TTextFileWriter)
implementation

uses
CmnFunc2;
CmnFunc2, PathFunc;

var
Wow64DisableWow64FsRedirectionFunc: function(var OldValue: Pointer): BOOL; stdcall;
Expand Down

0 comments on commit c87ec25

Please sign in to comment.