You are not logged in.
Pages: 1
I think that we should use unicode version of functions GetUserName and GetComputerName for Delphi 2009 + in procedure SetExecutableVersion:
procedure SetExecutableVersion(aMajor,aMinor,aRelease: integer);
var setVersion,i: integer;
{$ifdef MSWINDOWS}
TmpSize: cardinal;
{$ifdef unicode}
Tmp : array[byte] of Char;
{$else}
Tmp: array[byte] of AnsiChar;
{$endif}
{$endif}
...
and use GetUserNameW/GetComputerNameW for Unicode and GetUserNameA/GetComputerNameA for non unicode version
Offline
Indeed.
Here, we always use pure ASCII chars for host and user names (since it make it easier to work with, and enough in English - or French - use case), so the previous implementation expected that.
I've let SetExecutableVersion() handle Unicode characters in Host and User names, for all version of Delphi (also before Delphi 2009, since the variables are RawUTF8, so Unicode ready).
See http://synopse.info/fossil/info/e818c8f1bc
Thanks for the feedback!
Offline
Pages: 1