Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Login name and SYS(0) different
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01555309
Message ID:
01555347
Views:
75
Does these two return different results from SYS(0)?
DECLARE INTEGER GetUserName IN advapi32;
    STRING @lpBuffer,;
    INTEGER @nSize
    
nSize = 250
cBuffer = REPLICATE(Chr(0), nSize)
 
= GetUserName(@cBuffer, @nSize)
 
cBuffer = STRTRAN(cBuffer, CHR(0), "")
? "API:", cBuffer
 
? "Env.:", GETENV("USERNAME")
Previous
Reply
Map
View

Click here to load this message in the networking platform