This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes C / C++ and the fly likes Killing a process by name using WMI in C/C++ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Languages » C / C++
Bookmark "Killing a process by name using WMI in C/C++ " Watch "Killing a process by name using WMI in C/C++ " New topic
Author

Killing a process by name using WMI in C/C++

karthik deepak
Greenhorn

Joined: Nov 19, 2008
Posts: 6
Hey,
Im trying to kill a process by name. I have used the msdn example code of
killing a process by pid. I wrote a method to get the pid using the name of
the process, and its working fine till i get the pid and store it in a
variable called ProcId.
The problem is how do i include the ProcId in the method call::::::
I have done it like this

and it says error C2110: '+' : cannot add two pointers

It works fine when the pid is harcoded like this:


Here is my code...


<Karthik> Future SCJP
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Killing a process by name using WMI in C/C++
 
It's not a secret anymore!