For a program with no handles because there are no forms, how would I be able to determine if the system is shutting down to close the program?
Printable View
For a program with no handles because there are no forms, how would I be able to determine if the system is shutting down to close the program?
is the program have a unique window class?
Um... it shouldn't, seeing as there aren't any loaded handles?
then you got to find out it process id :p
the program has a process id, I have that, is that the same as a window class? How does that help me determine if windows is shutting down?
Process ID is different from the WindowClass
Okay, I think there is some element of miscommunication here. From what I understand, a class is the name describing a certain object, such as a "Button" or a "Static" class. The process is the ID given to a program when run. This program therefor has a process, but because it has no objects, it has no handles or therefor any classes to the nonexistent handles. Now, supposing this is right, and that I only have the process to a program, how can it know that windows is shutting down?