Information générale
Catégorie:
Fonctions Windows API
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement