TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ALL
from: BART BROERSMA
date: 1997-08-29 03:53:00
subject: Who Am I program

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.