Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get the User ID...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00513880
Message ID:
00513941
Vues:
16
>>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.


Works fine on W2K with FPW2.6.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform