* FormatMessageA -> FormatMessage (W version)

git-svn-id: trunk@21937 -
This commit is contained in:
michael 2012-07-18 09:17:30 +00:00
parent 8a9bd38cd7
commit 252c2bbc83

View File

@ -63,14 +63,16 @@ Function GetLoadErrorStr: string;
Var
rc,c : integer;
w : widestring;
begin
rc := GetLastError;
SetLength(Result,255);
C:=FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM,nil,rc,
SetLength(w,255);
C:=FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,nil,rc,
MakeLangId(LANG_NEUTRAL, SUBLANG_DEFAULT),
@Result[1], 255,nil);
SetLength(Result,c);
@W[1], 255,nil);
SetLength(w,c);
Result:=w;
end;
{$endif}