mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 00:09:25 +02:00
* patch by Wallaby, mantis 0038382, load filename via -W function
git-svn-id: trunk@49245 -
This commit is contained in:
parent
e31923c290
commit
f0cc698a2f
@ -205,9 +205,12 @@ end;
|
||||
function GetModuleFileName: String;
|
||||
const
|
||||
MAX_PATH_SIZE = 2048;
|
||||
var
|
||||
FileName: WideString;
|
||||
begin
|
||||
SetLength(Result, MAX_PATH_SIZE);
|
||||
SetLength(Result, Windows.GetModuleFileName(HInstance, @Result[1], MAX_PATH_SIZE));
|
||||
SetLength(FileName, MAX_PATH_SIZE);
|
||||
SetLength(FileName, Windows.GetModuleFileNameW(HInstance, @FileName[1], MAX_PATH_SIZE));
|
||||
Result := FileName;
|
||||
end;
|
||||
|
||||
function GetModuleName: String;
|
||||
|
Loading…
Reference in New Issue
Block a user