|
-
Aug 28th, 2001, 10:51 AM
#1
Thread Starter
New Member
Verifying
How do I verify who is logged in. I don't want my app to be used by the "user" group only administrators or power users.
Any code would be much appreciated.
The idea is to have no logon screens, I want the app to detect and then startup if the user is an administrator or power user, or return an error saying please login as administrator/power user.
Thanks, James
-
Aug 31st, 2001, 03:18 AM
#2
Thread Starter
New Member
Windows NT4 + 2000, is it also poss with Win9x?
-
Aug 31st, 2001, 07:31 AM
#3
Frenzied Member
Its possible on NT and 2k, perhaps 9x. NT/2k are actually the same architecture so they support most of the same stuff. The docs say 95/98 support the username function but I don't know about ME
You can use this API to get the username:
Public Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|