gharris999 Wrote: 
> 
> If you would like to reassert "ownership" of all this code, please be
> my guest.
> 

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 and as such
there is often no interactive user logged in. Unfortunately the call in
-SetPowerState- to 'ExitWindowsEx' is ignored in this state.

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


-- 
tenwiseman
------------------------------------------------------------------------
tenwiseman's Profile: http://forums.slimdevices.com/member.php?userid=5764
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to