>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