Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows Login
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00271179
Message ID:
00271198
Views:
27
>>Is there a way in VFP to get the Windows Login name?
>
>SYS(0)

We had a problem with that, but I can't recall what it was. We now use:

local cBuffer
cBuffer = SPACE(30)
DECLARE INTEGER GetUserName IN WIN32api ;
STRING @,INTEGER @

GetUserName(@cBuffer,30)
cBuffer = chrtran(cBuffer,chr(0),'')

So I'll post this as a backup, anyway.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform