0

I have a query that gets a list of the running processes so I can monitor some of them. When I run my software from the command prompt it works just fine, but when I install it as a service I get an access violation. On the exec query call.

I would have expected the program running as a service to behave like the program running from command line.

Dolph
  • 1
  • Welcome to StackOverflow, can you explain more about the problem in detail? please read https://stackoverflow.com/help/how-to-ask – Syed M. Sannan Nov 04 '22 at 15:06
  • I am using wbemservices ExecQuery inside a C++ program to get a list of processes running on the local machine. The coinitialize and coinitializesecurity are setup. The program I am creating will need to run installed on the machine as a service. When I run the program from command line it works just fine, when I install the program as a service (using sc.exe) and start it. Then I get an access violation error. It does not notify me of anything. The program just disappears. I know it is an access violation because I have attached visual studio debugger to the program. – Dolph Nov 04 '22 at 15:37

0 Answers0