Re: Windows Impersonation using C#

  • Thread starter Thread starter Willy Denoyette [MVP]
  • Start date Start date
W

Willy Denoyette [MVP]

Did you carefully read the the note at the end of document ?

Willy.

chapman wrote:
|| Hello,
||
|| I would like to change the WindowsIdentity in my C#
|| program.
|| Just like "Impersonate a Specific User in Code" as mention
|| in http://support.microsoft.com/default.aspx?scid=kb;en-
|| us;Q306158
||
|| [DllImport("advapi32.dll")]
|| public static extern bool LogonUser(string lpszUserName,
|| string lpszDomain, string lpszPassword, int dwLogonType,
|| int dwLogonProvider, ref IntPtr phToken)
||
|| However, I got the error code = 126, The specified module
|| could not be found. ERROR_MOD_NOT_FOUND, using
|| GetLastError().
||
|| What is the reason? How do I solve this problem?
||
|| Thanks
|| Chapman
 
Back
Top