Thank You George.
The realy work for me. It work on NT just fine.
I have a question.
What is the use of the lcDevice? It it the device use to get the user ID? If we put "C:\" will it work or it will return the User ID of Windows?
>
>Yep, here's how (requires Foxtools):
m.handle = RegFN("WNetGetUser", "@C@C@L", "L")
>lcdevice = 'F:\'
>lcbuffer = SPACE(260)
>lnsize = LEN(lcbuffer)
>IF CallFN(m.handle, @lcdevice, @lcbuffer, @lnsize) = 0
> ? LEFT(lcbuffer, lnsize - 1)
>ENDIF
And yes, I've tested this, but on Win98.