Here's one I've used for years.

local lcusername,lres,cUser
Declare integer GetUserName in advapi32 String@, Integer@
lcusername = replicate(chr(0),255)
lres = GetUserName(@lcusername,255)
If lres # 0
        cUser=(upper(left(lcusername,at(chr(0),lcusername)-1)))
Else
        cUser="UNKN"
Endif
?cUser

I've used this with security to bypass a login screen in an application,
where the user is in the system.

HTH,
Mike


----------------------------
Powered by Execulink Webmail
http://www.execulink.com/


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cc070d79189c39ab82405628d20992c1.squir...@www.webmail.execulink.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to