Below is the code to return the parent id of a process, given a process id. This can be helpful in circumstances when we have to scan all the running processes to find out the spawned processes from another process. [code language=”cpp”] // change this method signature according to your requirements BOOL GetParentPID( DWORD dwParentId,