Cannot use ExitWindowEx(...)

  • Thread starter Thread starter Liang Yitao
  • Start date Start date
L

Liang Yitao

Before I using this function, I've done all the prepare
things. This included:
GetCurrentProcess();
OpenProcessToken(...);
LookupPrivilegeValue(...);
AdjustTokenPrivileges(...);
And the return code or the error code set by these
functions indicated that they all executed successfully.
But the ExitWindowEx(...) still fail. Is there any reason
for the failure? Or can I get another simplier approacht
to close the system?

Any expert please help, and thanks a lot.
 
Before I using this function, I've done all the prepare
things. This included:
GetCurrentProcess();
OpenProcessToken(...);
LookupPrivilegeValue(...);
AdjustTokenPrivileges(...);
And the return code or the error code set by these
functions indicated that they all executed successfully.
But the ExitWindowEx(...) still fail.

What does GetLastError (or the ERR pseudo register if you're
debugging) tell you it thinks is the problem?

You might want to show your code and explain in what context it's been
called in.

Merry Christmas
Dave
 

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

Back
Top