Explorar o código

Added more info about ANSI/Unicode.

Martijn Laan %!s(int64=13) %!d(string=hai) anos
pai
achega
f4cfc257fe
Modificáronse 1 ficheiros con 11 adicións e 3 borrados
  1. 11 3
      Examples/CodeDll.iss

+ 11 - 3
Examples/CodeDll.iss

@@ -22,18 +22,26 @@ Source: "MyDll.dll"; DestDir: "{app}"
 const
 const
   MB_ICONINFORMATION = $40;
   MB_ICONINFORMATION = $40;
 
 
-//importing a Windows API function
+//importing an ANSI Windows API function
 function MessageBox(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal): Integer;
 function MessageBox(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal): Integer;
 external '[email protected] stdcall';
 external '[email protected] stdcall';
 
 
-//importing a custom DLL function, first for Setup, then for uninstall
+//importing a Windows API function, automatically choosing ANSI or Unicode (requires ISPP)
+//function MessageBox(hWnd: Integer; lpText, lpCaption: String; uType: Cardinal): Integer;
+//#ifdef UNICODE
+//external '[email protected] stdcall';
+//#else
+//external '[email protected] stdcall';
+//#endif
+
+//importing an ANSI custom DLL function, first for Setup, then for uninstall
 procedure MyDllFuncSetup(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal);
 procedure MyDllFuncSetup(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal);
 external 'MyDllFunc@files:MyDll.dll stdcall setuponly';
 external 'MyDllFunc@files:MyDll.dll stdcall setuponly';
 
 
 procedure MyDllFuncUninstall(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal);
 procedure MyDllFuncUninstall(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal);
 external 'MyDllFunc@{app}\MyDll.dll stdcall uninstallonly';
 external 'MyDllFunc@{app}\MyDll.dll stdcall uninstallonly';
 
 
-//importing a function for a DLL which might not exist at runtime
+//importing an ANSI function for a DLL which might not exist at runtime
 procedure DelayLoadedFunc(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal);
 procedure DelayLoadedFunc(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal);
 external '[email protected] stdcall delayload';
 external '[email protected] stdcall delayload';