I wrote this utility (exe) which can be called from within this host application.
And I’d prefer it that the utility can only be called from the host application.
Running it from the outside or a different host should terminate the utility immediately.
Is there a way to find out which process launched my utility?
Thanks for the replies.
You can use the CreateToolhelp32Snapshot function to enumerate the running process list and then the Process32First function to get the th32ParentProcessID which is the identifier of the process that created this process (its parent process).
See this example .