Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting NT user name in Win 95
Message
 
À
18/06/1998 21:17:02
Mike Siemers
Southwest Student Services
Mesa, Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00109767
Message ID:
00110046
Vues:
75
>I need to get the NT user name of the user currently logged in on a Win 95 client. It looks like the function is in SVRAPI.DLL. I'd also like to be able to get other information out of the NT directory for the current user, such as department, manager, etc.
Mike, here's the declaration for WNetGetUser that Robert mentioned:
DECLARE INTEGER WNetGetUser IN Win32API;
  STRING @lpszLocalName, STRING @lpszUserName,;
  INTEGER @lpcchBuffer
lcUserName = SPACE(200)
lnlength = LEN(lcUserName)
* Get current user
lnerror = WNetGetUser(0, @lcUserName, @lnlength)
IF lnerror = 0
  lnpt = AT(CHR(0), lcUserName)
  lcUserName = LEFT(lcUserName, lnpt - 1)
ENDIF
The remaining information you're looking for may be in the NT registry. However, since I don't work with NT, I can't be of any further help in this area.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform