Craig Gemmill
August 16th, 2001, 12:23 PM
I need a way to determine what group the logged in user belongs to on Win2k. For instance: Administrator's, Power User's, User's...etc. Thanks in advance for any ideas!!
|
Click to See Complete Forum and Search --> : Who Is Logged In? Craig Gemmill August 16th, 2001, 12:23 PM I need a way to determine what group the logged in user belongs to on Win2k. For instance: Administrator's, Power User's, User's...etc. Thanks in advance for any ideas!! misu August 24th, 2001, 07:25 AM You can combines NetWkstaGetInfo (top three list items) and NetWkstaUserEnum (bottom three) to retrieve the domain (or workgroup) for a specified machine, along with the user name, server and domain in which the user is currently logged (under NT of better. When interrogating Win9x machines, NetWkstaGetInfo will retrieve the OS information, however the call to NetWkstaUserEnum returns "not available", as this API has no meaning to a Win9x machine). The WKSTA_INFO_102 structure used by NetWkstaGetInfo returns information about a workstation environment, including platform-specific information, the names of the domain (or workgroup) and the local computer, number of users logged on to the local computer, as well as information concerning the operating system on the machine. The WKSTA_USER_INFO_1 used by NetWkstaUserEnum returns the name of the user currently logged on to the workstation, the name of the domain in which the user is currently logged on, the name of the computer that authenticated the server, as well as any other domains browsed by the workstation. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |