Extreme_Coder
July 28th, 2005, 07:45 AM
What is the WinAPI used to Find the Windows type (like Xp, 2000, Me) and to find the currnet privilege of logged in user ?
|
Click to See Complete Forum and Search --> : WinAPI for Finding Windows Type and Priveleges Extreme_Coder July 28th, 2005, 07:45 AM What is the WinAPI used to Find the Windows type (like Xp, 2000, Me) and to find the currnet privilege of logged in user ? golanshahar July 28th, 2005, 08:26 AM to verfiy windows version use the ::GetVersionEx(..) (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getversionex.asp) to find out user privilege look at the ::GetTokenInformation(..) (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/gettokeninformation.asp) Cheers Extreme_Coder July 28th, 2005, 08:35 AM Thankx for the Reply, what I need is to know whether the current logged in User is an Administrator or not ? golanshahar July 28th, 2005, 08:44 AM look at the CheckTokenMembership(..) (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/checktokenmembership.asp) scroll it down and there is a IsUserAdmin( ) function. Cheers codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |