VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

This code demostrates how to validate a user in a VB application against the NT domain. The purpose

Adam Rogerson  (1 Submission)   Windows System Services   Visual Basic 5.0   Unknown Difficulty   Fri 12th February 1999   Mon 8th February 2021

This code demostrates how to validate a user in a VB application against the NT domain. The purpose of this application is to allow an

API Declarations



'To set this privilege:
'Load User Manager
'Choose "User Rights" from the "Policies" menu.
'Click "Show Advanced User Rights".
'Choose "Act as part of the operating system" from the "Right" combo box
'Grant this privilege to the user or group that will be used to run the application. (i.e. on my workstation, I gave my user Id this Right)
'Logoff and back into NT to obtain the new NT security token.


Option Explicit

Public Const LOGON32_LOGON_INTERACTIVE = 2
Public Const LOGON32_LOGON_BATCH = 4
Public Const LOGON32_LOGON_SERVICE = 5
Public Const LOGON32_PROVIDER_DEFAULT = 0



Declare Function LogonUser Lib "advapi32" Alias "LogonUserA" _
(ByVal lpszUsername As String, ByVal lpszDomain As String, _
ByVal lpszPassword As String, ByVal dwLogonType As Long, _
ByVal dwLogonProvider As Long, phToken As Long) As Long

Declare Function CloseHandle Lib "kernel32" _
(ByVal hObject As Long) As Long



Rate This code demostrates how to validate a user in a VB application against the NT domain. The purpose (1(1 Vote))
This code demostrates how to validate a user in a VB application against the NT domain. The purpose.bas

This code demostrates how to validate a user in a VB application against the NT domain. The purpose Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters