I've writeten a program for Win98 to detect user name of the current user. For this I try NetUserGetInfo. Program assembled successfully but when I run exe module I has recieved message that NetUserGetInfo function is not presents in NETAPI32.DLL... How can I detect current user name in Windows98 ?
Thanks to everybody who can help me,
Mike
Posted on 2002-02-07 04:39:11 by Mike
Hi Mike,

I use always registry way. Windows 9X all time start stored current username in (and entered other username)

HKEY_LOCAL_MACHINE\Network\Logon\username

btw: i dont try NETAPI32.DLL - NetUserGetInfo but possible.

have nice day,
Posted on 2002-02-07 05:28:37 by CYDONIA
BOOL GetUserName(

LPTSTR lpBuffer, // address of name buffer
LPDWORD nSize // address of size of name buffer
);




Why not ? :rolleyes:
Posted on 2002-02-07 06:04:10 by JCP