

If impersonateValidUser( "SomeAccount", "SomeDomain", "SomePassword") Then Public Sub Page_Load(ByVal s As Object, ByVal e As EventArgs) Dim LOGON32_LOGON_INTERACTIVE As Integer = 2ĭim LOGON32_PROVIDER_DEFAULT As Integer = 0ĭim impersonationContext As WindowsImpersonationContextĭeclare Function LogonUserA Lib "advapi32.dll" (ByVal lpszUsername As String, _ĭeclare Auto Function DuplicateToken Lib "advapi32.dll" ( _īyRef DuplicateTokenHandle As IntPtr) As Integerĭeclare Auto Function RevertToSelf Lib "advapi32.dll" () As Longĭeclare Auto Function CloseHandle Lib "kernel32.dll" (ByVal handle As IntPtr) As Long
