mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-26 08:30:09 +02:00
* FormatMessageA -> FormatMessage (W version)
git-svn-id: trunk@21937 -
This commit is contained in:
parent
8a9bd38cd7
commit
252c2bbc83
@ -63,14 +63,16 @@ Function GetLoadErrorStr: string;
|
|||||||
|
|
||||||
Var
|
Var
|
||||||
rc,c : integer;
|
rc,c : integer;
|
||||||
|
w : widestring;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
rc := GetLastError;
|
rc := GetLastError;
|
||||||
SetLength(Result,255);
|
SetLength(w,255);
|
||||||
C:=FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM,nil,rc,
|
C:=FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,nil,rc,
|
||||||
MakeLangId(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
MakeLangId(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||||
@Result[1], 255,nil);
|
@W[1], 255,nil);
|
||||||
SetLength(Result,c);
|
SetLength(w,c);
|
||||||
|
Result:=w;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$endif}
|
{$endif}
|
||||||
|
Loading…
Reference in New Issue
Block a user