1

I am writing a windows service (c++) that need to detect specific windows process termination.

I thought about two different approaches to detect the termination:

  1. Using WMI as described here.
  2. Using winapi WaitForSingleObject(hHandle, INFINITE) function on the process' handle.

The obvious difference is that WMI uses a CALLBACK function.

What are the other major differences, advantages and disadvantages, between the two approaches?

Thanks!

4

1 に答える 1