What is Name of my process
-
Hello, I am C++/VC++ developer. Many times for debugging we need to attach running project to our code. My project is huge. There are whole lot of processes are running. Suppose I have a code and I wanted to attach with process. I don't know name of process I wanted to attach with. Is there any way by which I can identify name of the process from my code (or IDE). I highly appropriate, any help regarding this concern. Thanks and Regards Happy Programming.
-
Hello, I am C++/VC++ developer. Many times for debugging we need to attach running project to our code. My project is huge. There are whole lot of processes are running. Suppose I have a code and I wanted to attach with process. I don't know name of process I wanted to attach with. Is there any way by which I can identify name of the process from my code (or IDE). I highly appropriate, any help regarding this concern. Thanks and Regards Happy Programming.
Hi, The operating system uses process identifiers (PID) from 0xC through 0x41DC to uniquely identify a process and is always (pid % 4 == 0) because of tag bits. You can use GetWindowThreadProcessId [^]to identify PID of other GUI processes or GetCurrentProcessId [^]for your current process. If you want the filename of current process you can use the GetModuleFileName Function[^] with GetCurrentProcess[^] Best Wishes, -David Delaune
-
Hello, I am C++/VC++ developer. Many times for debugging we need to attach running project to our code. My project is huge. There are whole lot of processes are running. Suppose I have a code and I wanted to attach with process. I don't know name of process I wanted to attach with. Is there any way by which I can identify name of the process from my code (or IDE). I highly appropriate, any help regarding this concern. Thanks and Regards Happy Programming.
-
Hello, I am C++/VC++ developer. Many times for debugging we need to attach running project to our code. My project is huge. There are whole lot of processes are running. Suppose I have a code and I wanted to attach with process. I don't know name of process I wanted to attach with. Is there any way by which I can identify name of the process from my code (or IDE). I highly appropriate, any help regarding this concern. Thanks and Regards Happy Programming.
If you mean to attach a debugger to the running executable of your code, then, usually, your debugger will have a means to do that. E. g. in Visual Studio you select the menu
Debug-->Processes
to get a list of processes that are currently running, and then choose one of that list to attach to. If your code is part of a specific program, the name of that program defines the name of the process. If this program spawns multiple threads, you will still need to attach to that program - it will cause the debugger to attach to all threads spawned by this process. If you mean to attach the running program of your code to attach to ... something else (to what?) then you need a programatical solution as pointed out in the other responses.Pranit Kothari wrote:
I highly appropriate
I think you mean 'appreciate' ;)