S
Srini
Hi
Could someone please let me know how to get a PID of a process from a
C Program on Windows platform.
e.g
I have a C program executable called myprog.exe and there could be
several instances of this program running. I would like to know the
PID(process id) of a given instance of myprog.exe.
I guess I can call the system() function and execute the following DOS
command.
tasklist /fi "IMAGENAME eq myprog.exe" /nh /fo "TABLE"
But this will give me a list of all the instances of myprog.exe
My questions is how can i figureout the PID of the instance I am
running from within myprog.c?
Thanks a lot for your time in advance.
Srini
Could someone please let me know how to get a PID of a process from a
C Program on Windows platform.
e.g
I have a C program executable called myprog.exe and there could be
several instances of this program running. I would like to know the
PID(process id) of a given instance of myprog.exe.
I guess I can call the system() function and execute the following DOS
command.
tasklist /fi "IMAGENAME eq myprog.exe" /nh /fo "TABLE"
But this will give me a list of all the instances of myprog.exe
My questions is how can i figureout the PID of the instance I am
running from within myprog.c?
Thanks a lot for your time in advance.
Srini