AnsweredAssumed Answered

Get UserName

Question asked by VRFuser on Jun 2, 1998
Date sent:           Mon, 1 Jun 1998 08:44:52 -0400
Subject:             Re: VRF: Get UserName
Copies to:           CARNAHAN_LYLE/,

> Item Subject: VRF: Get UserName
>      One way to do this is to make import a compiled function from the
>      ADVAPI32.DLL file that ships with Win95 and WinNT. Create a header
>      file with the following definition:
>      int GetUserNameA(char* lpBuffer, int* nSize);
>      then use the import library to load the file in the Windows system
>      directory with the file as ADVAPI32.DLL. I have used this in WinNT to
>      get the username currently logged in, this should apply to Win95 as
>      well.

Thank you for your answer. It works great. But I'm not quite shure with the input
variables. If I import this function I receive a function with 'lpbuffer' and 'nsize'
as input values. Are there any requirements for their content?

Secondly I would be very interested in a list of all useful functions
windows(95/NT) supplies in their DLLs. Is there a list anywhere?

Georg Nied
Software Development
51149 Koeln