Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding out who the user is...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00178748
Message ID:
00178939
Vues:
62
>LOCAL ;
> lcNull, ;
> lcUserId, ;
> lnLen
>
>lcNull=""
>lcUserId=SPACE(255)
>lnLen=255
>
>* Use the WNetGetUser function in the Win32API to get the user id
>DECLARE INTEGER WNetGetUser IN WIN32API String @, String @, Integer @
>IF WNetGetUser(@lcNull,@lcUserId,@lnLen)=0
> lcUserId=UPPER(LEFT(lcUserId,AT(CHR(0),lcUserId)-1))
>ELSE
> lcUserId = ""
>ENDIF
>
>RETURN ALLTRIM(lcUserId)

Mike,

Does that work with all OSs, NOSs, and Network clients? If so, thanks for another very useful hint!

Regards,
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform