Discussion:
GUARDIAN C++ How can I get my process name o PID
(too old to reply)
Luis Silva
2021-02-06 03:31:19 UTC
Permalink
Hi,

I have a C guardian process.

I want to know my process name i.e. $Y9SA or the equivalent of my process ID i.e. 1,2345

I tried with get_pid but I get a runtime error.

Is there a way I can get any of this two values at runtime.
red floyd
2021-02-06 03:32:23 UTC
Permalink
Post by Luis Silva
Hi,
I have a C guardian process.
I want to know my process name i.e. $Y9SA or the equivalent of my process ID i.e. 1,2345
I tried with get_pid but I get a runtime error.
Is there a way I can get any of this two values at runtime.
Look up PROCESS_GETINFOLIST_
Luis Silva
2021-02-06 04:29:30 UTC
Permalink
Post by red floyd
Post by Luis Silva
Hi,
I have a C guardian process.
I want to know my process name i.e. $Y9SA or the equivalent of my process ID i.e. 1,2345
I tried with get_pid but I get a runtime error.
Is there a way I can get any of this two values at runtime.
Look up PROCESS_GETINFOLIST_
What happens if I have two insances of the same program running. How can I know which ID is mine?

Does process_getinfolist_ works to know my own pid?
Luis Silva
2021-02-06 05:12:01 UTC
Permalink
Post by red floyd
Post by Luis Silva
Hi,
I have a C guardian process.
I want to know my process name i.e. $Y9SA or the equivalent of my process ID i.e. 1,2345
I tried with get_pid but I get a runtime error.
Is there a way I can get any of this two values at runtime.
Look up PROCESS_GETINFOLIST_
Thank you a lot Red Floyd!

I started with PROCESS_GETINFOLIST_ and ended with PROCESS_GETINFO_ as in need info of myself.

You pointed me in the right direction!

Continue reading on narkive:
Loading...