I want to be able to detect and abort OS shutdown from my application, preferably by using the Windows API. I know that it is possible to do this manually using the command shutdown -a In the worst case, I could ShellExecute this, but I was wondering if there was a better way.
Also, how do I find out programatically that the OS is abou...
Hi,
I am developing a windows service in .Net 3.5 in C#. This service is used to periodically invoke a windows form. Now I would like to hook an event to the service so that when the user tries to shut down the system, then also the windows form will appear, preventing the shut down process. User can then only make the system shutdown t...
My windows service is a data server with substantial cache. During service OnStop I save the cache so that no data is lost. Saving cache may take several minutes so to prevent windows service manager from timeout I use SetServiceStatus Win32 callback:
this.serviceStatus.currentState = (int)State.SERVICE_STOP_PENDING;
this.serviceStatus....
How can I in a Delphi application (7, trying to port it to 2010) force the system (XP or 7) to shut down?
...
Hi,
I want to write the utility which will be scheduled task, and will take the list of computer names on domain. After a particular time which will be set in the utility machines with that name get shutdown.
Please share your thoughts on this...
Thanks.
Anjan
...
I have to write a C# application that runs on WindowsME. Yes, I mean that Microsoft operating system that has been forgotten a long long time ago. My program needs no user interaction and as WindowsME doesn't support services, it will be a console application. Furthermore it will be used on more modern operating systems, where the user c...
I have developed middleware that provides RPC functionality to multiple client applications on multiple platforms within our organization. The middleware is written in C# and runs as a Windows NT Service. It handles things like file access to network shares, database access, etc. The middleware is hosted on two high end systems runnin...
Hello everybody
I have a windows service started (written in C# .net2.0).
I want to detect when the computer shutdown/reboot and cancel it.
After the cancel I want do some actions and restart windows.
I have tried it, but it not working
using Microsoft.Win32;
partial class MyService: ServiceBase
{
protected override void OnStart(...
Hi,
I am working on an app where I need to detect system shutdown. However, I have not found any reliable way get a notification on this event. I know that on shutdown, my app will receive a SIGTERM signal followed by a SIGKILL. What I want to know is if there is someway to query if a SIGTERM is part of a shutdown sequence? Does any one ...
PC is shutting down during Lightmass/AO rendering only, CPUs never ovr 70c, Video Cards 65c..no overheating.... runs ANY game in 200+FPS : Unable to load image \SystemRoot\system32\ntoskrnl.exe, Win32 error 0n2*** ERROR: Module load completed but symbols could not be loaded for ntoskrnl.exe and the debugger gives me.Probably caused by : ...
I am writing an application that runs in the background from startup to shutdown, and in some circumstances I need the application to display a dialogue for the user to choose whether or not to continue shutting down. This application will only be running on Windows, but may be running on any version from 2000 onward.
While I have certa...
I'm making a protected-mode OS based on Intel's x86 architecture, and was looking for some information on how to power off the computer via assembly code, or something like that. Could you help me with this problem?
...
I have a windows Service always running once PC started, how would i detect using .NET 3.5 or WMI, when the user or some other application/process has requested a shutdown or reboot in windows.
I do not want to stop it, just log the time and who initiated the shutdown (user or process is fine, don't really need to know which process)
T...