Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the User ID...
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00513880
Message ID:
00514547
Views:
9
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform