Application error using LogonUserA (advapi32.dll)

B

Blacksheep

Can anyone help me with the following problem :
I'm just trying to have the API call LogonUserA run correctly.
Each run ends up with the following message :
"The instruction at 0x77.. referenced memory at 0xcccc. The memory
could not be written.

I'm using VC++ 6.0 on WIN200.

I've tried both way of linking with advapi32.dll, I mean at load time
and dynamically at run time, both crash.
A call to GetUserNameA just before works fine.
GetUserNameA ((LPTSTR)UserName, &lzSize);


Just after I have the following :
UserValid = LogonUserA((LPTSTR)UserName,
lpszDomain,(LPTSTR)UserPasswd,dwLogonType,dwLogonProvider, phToken
);


Has anyone experienced a similar problem ? Any idea or suggestion
welcome


(e-mail address removed)
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top