Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NT User Information
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00208026
Message ID:
00208039
Views:
22
>Are there any API calls that will return Windows NT Server user information to VFP. I'm currently using Netlib for some NT functions, but I need to be able to query Windows NT for user home directory and fullname.
>

The easiest way to access the information is with NetGetUserInfo(), but it only works under NT. You'd have to call it repetitively to get different information about the user; the two items you mention are returned in the level 1 call as a UER_INFO_1 structure. No, I don't have sample code to give you for VFP.

You may want to look at either the ADSI ActiveX control (downloadable from Microsoft), and the Windows Scripting Host's Wscript.Shell and Wscript.Network objects (the Special Folders collection is exposed through Wscript.Shell, and the user name through Wscript.Network)

>Rick Napolitan
>
>nappy@mail.twd.net
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform