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:
00513939
Views:
11
This message has been marked as the solution to the initial question of the thread.
>I have a client with Old FPW 2.x appl. The client are user a GPLib.fll to get the User ID. For some reasions the function that get the User ID do not Work on Window 2000.
>
>I know we had a way, back in the old days, to get User ID in FPW2.6 with a call to FoxToll or Win API.
>
>Any one remember's HOW?

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.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform