Link to home
Create AccountLog in
Avatar of aditya_khaund
aditya_khaundFlag for India

asked on

PROCESS GROUP IN WINDOWS

I have  a code in unix which checks for process group in UNIX using  getpgrp library function and again call  getppid to get parent ID . If I found both of them equal then I conclude that the caller has called the script correctly .

I want to do the same for windows using WINAPI . Any  help on that will be appreciated.

THanks
Aditya
Avatar of Frosty555
Frosty555
Flag of Canada image

I don't see anything on process groups in the winapi, but this is microsoft's reference for all process-related winapi calls, you may find what you're looking for in there:

WinAPI Reference:
http://msdn.microsoft.com/en-us/library/aa383749(VS.85).aspx

Process and Thread related calls:
http://msdn.microsoft.com/en-us/library/ms684847(v=VS.85).aspx

Overview of Processes and Threads:
http://msdn.microsoft.com/en-us/library/ms684841(v=VS.85).aspx

Avatar of aditya_khaund

ASKER

Hi thanks for the help . I have got hose doc though . I am specifying my requirement here .
I need to check a a exe is called corectly by another script or bat program.

In unix I do the same by matching o/p of getpgrp with getppid .

Can you help me to do the same in windows ?
If you can attach some sample code I will really appreciate it .

Thanks
Aditya
ASKER CERTIFIED SOLUTION
Avatar of parnasso
parnasso
Flag of Italy image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account