tenwiseman;389557 Wrote: > Nah... what would I do with it? I'll just sleep on it for another 2 > years. Whoops, got to update that blog.... :-) > > Anyway forgive me, I've been having a fiddle with your SCPowerTool.exe. > A little feature mod request perhaps? > > I run SqueezeCenter as a service on Windows 2003 Server. Unfortunately > the call in -SetPowerState- to 'ExitWindowsEx' is ignored in this state > as there is no interactive user logged in. > > I've modified mine to use 'InitiateSystemShutdown' instead with the > following. > > > Code: -------------------- > > > > case POWERACTION_SHUTDOWN: > if (!InitiateSystemShutdown(NULL, L"SCPowerTool SHUTDOWN", 0, TRUE, FALSE)) > lpAppData->dwError = GetLastError(); > break; > > case POWERACTION_RESTART: > if (!InitiateSystemShutdown(NULL, L"SCPowerTool RESTART", 0, TRUE, TRUE)) > lpAppData->dwError = GetLastError(); > break; > > -------------------- > > > > Seems to work OK at present, but dunno yet if there is a downside to > using InitiateSystemShutdown with interactive (and also VMWare > Server) sessions present. > > -- > Adrian C If this works on XP (as I assume it will) I'll incorporate this into the next version. Thanks!
-- gharris999 ------------------------------------------------------------------------ gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115 View this thread: http://forums.slimdevices.com/showthread.php?t=48521 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/lists/listinfo/plugins
