>How can I get the
Full Name (as seen in the NT user manager) for use in my applications? Will it be different for Win9x?
>
>Please note - I'm not referring to the 'User Name', which is the login name.
>
Under NT, the NetUserGetInfo() at level 2 returns a structure that contains a pointer to the Full Name. This API call is not available under Win9x.
If an NT (or Win9x) system is logged into an NT domain, the information can be retrieved using Microsoft's ADSI component, which can be downloaded from Microsoft. I've been laid up recently, and had the opportunity to read a good reference on ADSI ,
ADSI ASP Programmer's Guide by Stephen Hahn, from WROX Press (they also have a good book out on the WSH now.) While it's ASP oriented, the guide shows how to use the ADSI component to do things; Rick Strahl's
www.west-wind.com has a good whitepaper on using ADSI with VFP.
You could also write a COM component that ran on an NT system to execute a NetUserGetInfo() call and access it via DCOM.
I don't believe that Win9x without an NT system can provide that information, although the name of the registered owner of the system 9as opposed to the current user) is available in the registry.