This is what we use

Function NetUser
LOCAL llNameReturnValue, lcUserName, cReturnValue
DECLARE GetUserName IN WIN32API STRING @,INTEGER @
*!* Get the User Information
lcUserName = SPACE(50)
llNameReturnValue = GetUserName(@lcUserName,50)
RETURN IIF(llNameReturnValue,
left(ALLTRIM(UPPER(STRTRAN(lcUserName,CHR(0),'')))+space(10),10),space(10))
ENDFUNC

HTH,
Kent
  

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Kurt Wendt
> Sent: Tuesday, June 22, 2010 12:12 PM
> To: [email protected]
> Subject: Capturing the Username in VFP...
> 
> Hey folks,
> 
>  
> 
> I looked around in the Online help in VFP (the version I am 
> using to develop this small Time Tracking utility is 7.0 - 
> but, I could always switch over to VFP if the option IS 
> there!) - but, I found no way to capture the Username (as in 
> the Windows login). I suspect there may be no native way in 
> VFP to do it. 
> 
>  
> 
> However, I figured I would toss out the question to the good 
> folks on here. If there is a free function on the web that 
> can give me this functionality - which I can use under VFP - 
> that would be great too. I just know that where I work here - 
> they aren't going to cough up any $$$ to pay for a specific tool.
> 
>  
> 
> Thanks,
> 
>  -K-
> 
>  
> 
> Developer
> 
> Mr. Software of East Coast, Inc.
> 
> Division of Waitex Information System, Inc.
> 
>  
> 
> 
> 
> --- StripMime Report -- processed MIME parts --- multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
> 
[excessive quoting removed by server]

_______________________________________________
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/7efeba58a7264699964e9fe02e7e4...@kentlaptop
** 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