Browse Source

Clarifications.

Martijn Laan 1 year ago
parent
commit
004bae9ee3
3 changed files with 7 additions and 5 deletions
  1. 2 1
      Projects/Src/InstFunc.pas
  2. 1 1
      Projects/Src/Main.pas
  3. 4 3
      Projects/Src/ScriptRunner.pas

+ 2 - 1
Projects/Src/InstFunc.pas

@@ -262,7 +262,7 @@ end;
 
 function GenerateNonRandomUniqueTempDir(Path: String; var TempDir: String): Boolean;
 { Creates a new temporary directory with a non-random name. Returns True if an
-  existing directory was re-created. }
+  existing directory was re-created. This is called by Uninstall. }
 var
   Rand, RandOrig: Longint; { These are actually NOT random in any way }
   ErrorCode: DWORD;
@@ -296,6 +296,7 @@ begin
 end;
 
 function CreateTempDir: String;
+{ This is called by SetupLdr, Setup, and Uninstall. }
 var
   Dir: String;
   ErrorCode: DWORD;

+ 1 - 1
Projects/Src/Main.pas

@@ -1449,7 +1449,7 @@ end;
 
 procedure CreateTempInstallDir;
 { Initializes TempInstallDir and extracts the 64-bit helper into it if needed.
-  This is called by Setup, Uninstall, and RegSvr. }
+  This is called by Setup and Uninstall. }
 var
   Subdir, ResName, Filename: String;
   ErrorCode: DWORD;

+ 4 - 3
Projects/Src/ScriptRunner.pas

@@ -209,7 +209,7 @@ var
   S, DllName, FunctionName: AnsiString;
   UnicodeDllName: String;
   I: Integer;
-  ForceDelayLoad, DelayLoad: Boolean;
+  ForceDelayLoad: Boolean;
   ErrorCode: LongInt;
 begin
   ScriptRunner := Sender.ID;
@@ -257,11 +257,12 @@ begin
   end else
     ScriptRunner.Log('Skipping.'); { We're actually still going to call ProcessDllImport but this doesn't matter to the user. }
 
-  Result := ProcessDllImportEx2(Sender, p, ForceDelayLoad, DelayLoad, ErrorCode);
+  var DelayLoaded: Boolean;
+  Result := ProcessDllImportEx2(Sender, p, ForceDelayLoad, DelayLoaded, ErrorCode);
 
   if DllName <> '' then begin
     if Result then
-      ScriptRunner.LogFmt('Successfully imported the DLL function. Delay loaded? %s', [SYesNo[DelayLoad]])
+      ScriptRunner.LogFmt('Successfully imported the DLL function. Delay loaded? %s', [SYesNo[DelayLoaded]])
     else
       ScriptRunner.LogFmt('Failed to import the DLL function (%d).', [ErrorCode]);
   end;