PDA

Click to See Complete Forum and Search --> : help


Help
Mar 9th, 2001, 10:31 AM
Where do I learn how to use windows API in C/C++?
For example.
Where do I find out how to use API calls such as
ExitWindowsEx?

I have looked at www.msdn.microsoft.com but it just seems all garbage to me. I dont know half of what they are talking about.

ie - EWX_LOGOFF - Shuts down all processes running in the security context of the process that called the ExitWindowsEx function. Then it logs the user off.

So how do I use it?

Hope someone can point me to the right direction.

Technocrat
Mar 9th, 2001, 11:06 AM
ExitWindowsEx seems pretty strait forward to me. Sorry to say this but its the simplest API I have seen in awhile.

EWX_LOGOFF : Does exactly what it sounds like, it will log you off the computer.

EWX_POWEROFF : Is the newer shutdown, where it will power off the computer (If you have a computer that can do this) after going through the shutdown process.

EWX_REBOOT : Will reboot the computer after the shutdown process. Like going to shutdown in 95/98 and selecting, reboot the computer.

EWX_SHUTDOWN : Is the older shutdown where it says now it is safe to turn off your computer.

EWX_FORCE : Forces all process to end, using the normal end session.

EWX_FORCEIFHUNG : (For NT) Forces the process to end if they do not respond to the normal end session

So you could use it like:


ExitWindowEx(EWX_POWEROFF | EWX_FORCE, NULL);


As far as other API's like that, I have never really seen any real good tutorial on them for C++. I can usually figure them out in the MSDN. If not I search the MSDN for examples, in the example code, search online for example, or ask questions about them here.