mherger;406956 Wrote: > I've had a quick look at your solution. You're running some additional > helper app in the background? Not really, and yet..yes, in a sense. StartHidden.exe uses the same CreateProcess parameters as SqueezeTray uses in it's call to Win32::Process::Create, namely the DETACHED_PROCESS flag. This is necessary for this calling chain to succeed:
SC->SrvrPowerCtrl->system(StartHidden.exe SCPowerTool.exe --screstart) As long as SCPowerTool.exe is spawned as a DETACHED_PROCESS, then it can successfully restart the squeezesvc service. Absent this, squeezesvc restarts but immediately terminates, thinking that it is already running. So StartHidden.exe isn't any sort of background process. But it is a "helper app" in a sense. Since SqueezeTray.exe isn't a child process of squeezesvc, this shouldn't be an issue when it tries to restart the squeezesvc service. The last executable in the above chain, SCPowerTool, is using standard Win32 service control APIs to query, stop and restart the service. Remember, all the C code is there in the zip if you want to take a look. If replicating the service control stuff in perl is too hard, we could put all the service control stuff in a DLL written in C and make it easy for SqueezeTray to restart the service with a single call to a function in that DLL. In terms of how to signal SqueezeTray from SqueezeCenter that SC is requesting a restart of the service, how about using Win32::DDE::Client, etc? -- gharris999 ------------------------------------------------------------------------ gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115 View this thread: http://forums.slimdevices.com/showthread.php?t=61432 _______________________________________________ beta mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/beta
