Accessing NT Account Info

I need to access NT account info from a VB 5.0 App running on Windows 95.  I'm particularly interested in Fullname, Comment,  Home Drive, and Home Dir. I was able to get some of this info by calling netusergetinfo from the 16 bit netapi.dll using VB 4.0.  Is there a way to get this data using VB 5.0?  
dtdayAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dtdayAuthor Commented:
Edited text of question
0
mrmickCommented:
The same 32 bit function is available in the netapi32.dll

The NetUserGetInfo function retrieves information about a particular user account on a server.
Security Requirements:
No special group membership is required to successfully execute NetUserGetInfo. This is a change from LAN Manager, which required membership in the Administrators or Account Operators local group to call this function at information levels above 0 (except for the user's own account, which could use level 11).
NET_API_STATUS NetUserGetInfo(
    LPWSTR servername,      
    LPWSTR username,      
    DWORD level,      
    LPBYTE *bufptr      
   );      
 
Parameters
servername
Pointer to a Unicode string containing the name of the remote server on which the function is to execute. A NULL pointer or string specifies the local computer.

username
Pointer to a Unicode string containing the name of the user account on which to return information.

level
Specifies one of the following values to return the level of information provided.
Value      Meaning
0      Returns USER_INFO_0 structure pointed to in bufptr.
1      Returns USER_INFO_1 structure pointed to in bufptr.
2      Returns USER_INFO_2 structure pointed to in bufptr.
3      Returns USER_INFO_3 structure pointed to in bufptr.
10      Returns USER_INFO_10 structure pointed to in bufptr.
11      Returns USER_INFO_11 structure pointed to in bufptr.
20      Returns USER_INFO_20 structure pointed to in bufptr.
 
bufptr
Pointer to the buffer in which the data set with the level parameter is stored. The returned buffer should be deallocated using the NetApiBufferFree function.
 
Return Values
If the function is successful, it returns NERR_SUCCESS.
If the function fails, the return value is one of the following error codes.
Value      Meaning
ERROR_ACCESS_DENIED      The user does not have access to the requested information.
NERR_InvalidComputer      The computer name is invalid.
NERR_UserNotFound      The user name could not be found.

0
dtdayAuthor Commented:
Microsoft in their infinite wisdom did not include the  netusergetinfo function in the Windows95 version of the NetApi32.dll, though it does exist in the NetApi32.dll for NT 4.0.  I need this to work on Windows 95.
0
mrmickCommented:
hmmm...  Check out:

Microsoft Knowledge Base
Article ID: Q125700
Title: "Windows 95 Support for Net Function Calls"
http://premium.microsoft.com/support/kb/articles/q125/7/00.asp 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.