C
carbon_dragon
Ok, so here is the problem. I'm working on a headless server program
implemented as a .NET C# Console project. There is a UPS mounted to
this server (though not a windows compliant UPS). I can only talk to
the UPS over a special device driver.
Through this device driver I can detect that the UPS is going to notify
Windows 2000 server to shut down. So I start doing a graceful
termination. But Windows shuts down pretty quickly and there isn't time
to close my files and gracefully shut down. Apparently, the default
console application in .NET has a default behavior of terminating
immediately -- at least that is what seems to happen.
What I need to do is to delay windows for long enough (just a few
seconds really) so that I can gracefully terminate. How do I do that
with a console project. How do I delay the time between the time that
Windows 200 Server is told to shut down and the time it actually
teminates it's applications and shuts down? I've done a lot of web
searches and .NET searches but haven't found a console solution. Maybe
all I need is a steer to the right approach.
Thanks.
implemented as a .NET C# Console project. There is a UPS mounted to
this server (though not a windows compliant UPS). I can only talk to
the UPS over a special device driver.
Through this device driver I can detect that the UPS is going to notify
Windows 2000 server to shut down. So I start doing a graceful
termination. But Windows shuts down pretty quickly and there isn't time
to close my files and gracefully shut down. Apparently, the default
console application in .NET has a default behavior of terminating
immediately -- at least that is what seems to happen.
What I need to do is to delay windows for long enough (just a few
seconds really) so that I can gracefully terminate. How do I do that
with a console project. How do I delay the time between the time that
Windows 200 Server is told to shut down and the time it actually
teminates it's applications and shuts down? I've done a lot of web
searches and .NET searches but haven't found a console solution. Maybe
all I need is a steer to the right approach.
Thanks.