Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get informations from the NT Server
Message
De
24/02/1998 07:35:32
Bob Tracy
Independent Consultant
Driftwood, Texas, États-Unis
 
 
À
24/02/1998 02:53:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00080701
Message ID:
00080727
Vues:
31
>Is it possible to get informations from the NT Server. Such as your login name. The groups you may be part of and so on?
>
>Hope someone can help me.
Try this for user name:

PUBLIC lpUserIDBuffer
LOCAL nBufferSize, ;
RetVal
RetVal = 0
lpUserIDBuffer = SPACE(25) && Return buffer for user ID string
nBufferSize = 25 && Size of user ID return buffer
DECLARE INTEGER GetUserName IN Win32API AS GetName ;
STRING @lpUserIDBuffer, ;
INTEGER @nBufferSize
RetVal=GetName(@lpUserIDBuffer,@nBufferSize)
RETURN LEFT(lpUserIDBuffer,nBufferSize-1)

I've also seen several threads about this here on the UT and also some articles in the MS knowledge base. Also, take a look at WIN32API.hlp in your VFP directory.
Bob Tracy

Never engage in a battle of wits if you're only half armed.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform