具体代码如下:
typedef int (CALLBACK *SHUTDOWNDLG) (int);
CString s;
HINSTANCE hInst = LoadLibrary("shell32");
SHUTDOWNDLG SHShutDownDialog;
if(hInst != 0)
{
SHShutDownDialog = (SHUTDOWNDLG)GetProcAddress(hInst, (LPSTR)60);
(*SHShutDownDialog)(0);
FreeLibrary(hInst);
}