各位,下面程序在系统切换用户是可以执行到LaunchChild();但是在系统boot的时候却无法执行,琢磨了好久都不明白,还希望各位大大不吝赐教。         HOTKEY_LOGON_EVENT _T("Global\\Logon")
SECURITY_ATTRIBUTES SecurityAttributes;
SecurityAttributes.nLength = sizeof SECURITY_ATTRIBUTES;
SecurityAttributes.bInheritHandle = TRUE; //securityAttr.bInheritHandle should be set to true, or a service will not be able to communicate with applications.
SecurityAttributes.lpSecurityDescriptor = &SecutityDescriptor; ////Waiting For Any User Login/Switch User
while(1)
{
hLogonEvent = ::CreateEvent(&SecurityAttributes, FALSE, FALSE, HOTKEY_LOGON_EVENT); //Waiting For Any User Login/Switch User
WaitForSingleObject(hLogonEvent, INFINITE); CloseHandle(hLogonEvent); LaunchChild();
}