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

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.

Re: how can I get the loginname of user? by Trey

Trey
Mon Dec 29 22:34:34 CST 2003

check out SYS(0)

e.g.

lcUserName=Left(SYS(0), At("#", SYS(0))-1)

"Nic" <anonymous@discussions.microsoft.com> wrote in message
news:059c01c3ce89$7e51d740$a401280a@phx.gbl...
> 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



Re: how can I get the loginname of user? by anonymous

anonymous
Tue Dec 30 00:41:19 CST 2003


Thank you very much Josh Assing!!!

= )

>-----Original Message-----
>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.
>.
>

Re: how can I get the loginname of user? by Remus

Remus
Tue Dec 30 02:14:29 CST 2003

Another way:
? GETENV("USERNAME")
? GETENV("USERDOMAIN")

~ Remus

"Nic" <anonymous@discussions.microsoft.com> wrote in message
news:059c01c3ce89$7e51d740$a401280a@phx.gbl...
> 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