Results 1 to 3 of 3

Thread: Verifying

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    United Kingdom
    Posts
    6

    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

  2. #2

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    United Kingdom
    Posts
    6
    Windows NT4 + 2000, is it also poss with Win9x?

  3. #3
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    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
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width