Hi,
I need help on writing a simple WhoAmI program (a program that will return
the name of the currently logged-on user on a networkstation).
I tried the GetUsername function (D2, desktop version), but this will not
compile because it needs a pointer to a DWord as the second parameter (why
are all the examples in win32.hlp (?) in C ?), and using a pointer to a
longint just does not seem to work.
from the help files:
BOOL GetUserName(
LPTSTR lpBuffer,
LPDWORD nSize
);
lpBuffer
Points to the buffer to receive the null terminated string ....
nSize
Pointer tp DWprd that on input specifies the size of the buffer ...
It has to work on a W95 workstation on an MS network with an NT server, if
that information is of any value...
Anyone got a suggestion ?
Thanks in advance,
Bart
--------------------------------------
Bart Broersma
broersma@knmg.nl
* Wave Rider 1.20 [NR] *
... UNREGISTERED EVALUATION COPY
--- Wave Rider v1.20
---------------
* Origin: Aargh! BBS Amsterdam (2:280/606)
|