Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting User Names
Message
De
11/10/2001 14:48:51
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00566514
Message ID:
00567163
Vues:
14
>put this in your procedure lib
>
>PROCEDURE NetworkID
>LOCAL LocalName, UserName, BufferSize
>m.LocalName = CHR(0)
>m.UserName = SPACE(40)
>m.BufferSize = LEN(UserName)
>
>DECLARE INTEGER WNetGetUser ;
> IN WIN32API ;
> AS GetUserID ;
> STRING LocalName, ;
> STRING @UserName, ;
> INTEGER @BufferSize
>
>cErrorCode = GetUserID(LocalName, @UserName, @BufferSize)
>
>RETURN TRANSFORM(STRTRAN(m.UserName,CHR(0)))

This code gives me the login id of the current user. I looked
it up in MSDN and sometimes they refer to it as Username and
other times they call it a UserId or LoginId.

Apparently, what I'm trying to do is supply the LoginId and
have the OS return to me the FullName, something along the
lines of:

? FullName("KTONGE") && RETURNS: KEITH TONGE

   ...kt
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform