Re: how can I get the loginname of user? by Josh
Josh
Mon Dec 29 22:30:21 CST 2003
FUNCTION whoami
LOCAL lcUserName,;
lpUserIDBuffer, ;
nBufferSize, ;
RetVal
DECLARE INTEGER GetUserName IN Win32API AS GetName ;
STRING @lpUserIDBuffer, ;
INTEGER @nBufferSize
RetVal = 0
lpUserIDBuffer = SPACE(25) && Return buffer for user ID string
nBufferSize = 25 && Size of user ID return buffer
RetVal=GetName(@lpUserIDBuffer, @nBufferSize)
lcUserName = LEFT(lpUserIDBuffer,nBufferSize-1)
RETURN lcUserName
ENDFUNC
On Mon, 29 Dec 2003 20:00:42 -0800, "Nic" <anonymous@discussions.microsoft.com>
wrote:
>Dear All,
>
>I want to ask that how can I get the login name on the
>viusal foxpro? since I need to use GETOBJECT() function
>get the user's detail information from the domain.
>
>
>Thank you!!
>Happy new year!
>
>Nic
---
Remove x's to send.