I just joined this list and noticed the nt service messages (below)
I haven't investigated what winrash is, but _assuming_ that you need it as a service on NT, then the problem appears to be that it needs to display windows (or interact with the user somehow).
The main problem will be that services run on their own desktop (unique to the service, not the logon, screensaver or iteractive desktops).
A message box can be displayed on the interactive desktop by using the MB_SERVICE_NOTIFICATION flag with MessageBox().
To actually display some more complex UI, you need to create the window on the correct desktop. Check MSDN (msdn.microsoft.com) for details, but the following is what is probably required: 1. Call OpenInputDesktop(). 2. Call SetThreadDesktop() to allow the current thread to use that desktop. 3. Create your windows etc.
Note the security risk msdn notes for SetThreadDesktop. This is because the service is probably running as a priviledged user (the LocalSystem account unless specified otherwise). It will need the elevated priviledges to attach to the desktop which will have an ACL that only allows the current logged in user).
Hope that's enough to get someone working on this (sorry, I'm not volunteering :-(
Robert Shearman wrote:
Only on Win95/98/ME.
I thought we'd fixed the problems with running it as a service on NT so that it could again be run automatically?
Not as far as i know. It was recommended to mark the winrash service as "allowed to interact with desktop" or some such. It didn't help though.
//Jakob
I'm still looking for someone to take over winrash development. It's a sourceforge project written in c under visual studio 6. I can give developer access and help to anyone interested.
Chris
On 7/22/05, Paul Walker pwalker@paradise.net.nz wrote:
I just joined this list and noticed the nt service messages (below)
I haven't investigated what winrash is, but _assuming_ that you need it as a service on NT, then the problem appears to be that it needs to display windows (or interact with the user somehow).
The main problem will be that services run on their own desktop (unique to the service, not the logon, screensaver or iteractive desktops).
A message box can be displayed on the interactive desktop by using the MB_SERVICE_NOTIFICATION flag with MessageBox().
To actually display some more complex UI, you need to create the window on the correct desktop. Check MSDN (msdn.microsoft.com) for details, but the following is what is probably required:
- Call OpenInputDesktop().
- Call SetThreadDesktop() to allow the current thread to use that
desktop. 3. Create your windows etc.
Note the security risk msdn notes for SetThreadDesktop. This is because the service is probably running as a priviledged user (the LocalSystem account unless specified otherwise). It will need the elevated priviledges to attach to the desktop which will have an ACL that only allows the current logged in user).
Hope that's enough to get someone working on this (sorry, I'm not volunteering :-(
Robert Shearman wrote:
Only on Win95/98/ME.
I thought we'd fixed the problems with running it as a service on NT so that it could again be run automatically?
Not as far as i know. It was recommended to mark the winrash service as "allowed to interact with desktop" or some such. It didn't help though.
//Jakob