Re: Windows Impersonation using C#

  • Thread starter Willy Denoyette [MVP]
  • 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top