Hi,
I was wondering if there is a function that will display the Shut Down Windows dialog. Apparently, in VB you can declare function "#60" in shell32.dll and it'll come up, but how do you do that in C/C++?
Hi,
I was wondering if there is a function that will display the Shut Down Windows dialog. Apparently, in VB you can declare function "#60" in shell32.dll and it'll come up, but how do you do that in C/C++?
Hi,
Im not 100% sure, but i think as its part of the shell it would be hard to do in c++. So what you should do it make your own dlg and simply use ExitWindowsEx(), it would not be to hard to create your own shutdown dlg box.
Cheers
TNT
TNT
You Can Stop Me, But You Cant Stop Us All
Yes! I figured it out!
I first have to use LoadLibrary to get the module handle for the DLL, then GetProcAddress to get the address for the function, like so:-
Then, by calling the function:-Code:FARPROC SHShutdownWindows; HMODULE hShellDll; hShellDll = LoadLibrary("shell32.dll"); SHShutdownWindows = GetProcAddress(hShellDll, MAKEINTRESOURCE(60));
I get a rather spiffy Shut Down Windows dialog. Easy when you know how :PCode:(*SHShutdownWindows)(0);