Re: Win32Lib getUserName() problem
- Posted by AndyDrummond Dec 16, 2009
- 1387 views
mattlewis said...
Your code looks ok to me. Have you tried any of the other formats? If it fails, you might try calling GetLastError to see if there's anything interesting there.
Matt
Ah. This is a problem. First - the error is:
Error 464 - Couldn't link to function GetUserNameExABut more serious is that looking at the MS website it seems this is only available on Win XP Professional - and that is really a limitation I can't enforce. I suppose I shall have to ask the user to enter his name when I first run the program, and save that in an ini fle for that user so it uses the same name in future. A silly business - one feels that M$'s left hand and right hand are on opposite sides of Redmond! Oh - they are!
Thanks for your help and ideas, anyway. Any others - well, I still look at the forum....
Andy