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
 
Back
Top