Declaration :
DECLARE INTEGER GetUserName IN advapi32;
STRINGĀ @ lpBuffer,;
INTEGER @ nSize
Usage :
nSize = 250
cBuffer = REPLICATE(Chr(0), nSize)
= GetUserName(@cBuffer, @nSize)
cBuffer = STRTRAN(cBuffer, CHR(0), “”)
? cBuffer
? GETENV(”USERNAME”)
Related posts:
- Reduce Memory Usage in VFP
- Create INI file with VFP
This entry was posted on Saturday, November 15th, 2008 at 12:20 pm and is filed under Programming, Tips & Trick.You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.