Click here to Skip to main content
15,914,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CStatusBar help (new to VC++) Pin
Antony M Kancidrowski12-Jan-05 14:11
Antony M Kancidrowski12-Jan-05 14:11 
GeneralDisabling MRU List Pin
Aamir Butt11-Jan-05 23:20
Aamir Butt11-Jan-05 23:20 
GeneralRe: Disabling MRU List Pin
Selvam R12-Jan-05 2:03
professionalSelvam R12-Jan-05 2:03 
GeneralRe: Disabling MRU List Pin
Aamir Butt12-Jan-05 16:48
Aamir Butt12-Jan-05 16:48 
GeneralCapturing and stretching image Pin
José Luis Sogorb11-Jan-05 23:07
José Luis Sogorb11-Jan-05 23:07 
GeneralRe: Capturing and stretching image Pin
Selvam R12-Jan-05 2:08
professionalSelvam R12-Jan-05 2:08 
GeneralRe: Capturing and stretching image Pin
José Luis Sogorb12-Jan-05 6:53
José Luis Sogorb12-Jan-05 6:53 
GeneralCreateProcess and process groups Pin
ionzarate11-Jan-05 22:55
ionzarate11-Jan-05 22:55 
Hello everybody!

I´m using CreateProcess to create a new process, with the CREATE_NEW_PROCESS_GROUP
flag set in the argument "dwCreationFlags", to create a new process group.
Let´s call PROCESS_A the one which calls CreateProcess, and PROCESS_B
the one which is created.

MSDN says in "CreateProcess" function:
------------------------------------------------------
CREATE_NEW_PROCESS_GROUP:
The new process is the root process of a new process group. The process
group includes all processes that are descendants of this root process.
The process identifier of the new process group is the same as the process
identifier, which is returned in the lpProcessInformation parameter.
Process groups are used by the GenerateConsoleCtrlEvent function to enable
sending a ctrl+c or ctrl+break signal to a group of console processes.

------------------------------------------------------

I know that from PROCESS_A, I can get the PID of the PROCESS_B through
"lpProcessInformation", which is also the identifier of the new process
group. I also know that "GetCurrentProcessID" returns the PID of the
current process.

But I need that PROCESS_B knows the ID of its own process group, without
having to pass it in the command line arguments, when CreateProcess
is called.


-Is it possible to get the ID of a process group?

-How can PROCESS_B know the identifier of its own process group?
(without passing it in the command line when CreateProcess is called)

-Is there any function which returns process group ID of the calling
process, like "getpgid(0)" in Linux does?


Thanks all!.
Smile | :)
GeneralRe: CreateProcess and process groups Pin
Blake Miller12-Jan-05 5:46
Blake Miller12-Jan-05 5:46 
GeneralAccess violation reading location 0xcdcdcddd. Pin
aj168211-Jan-05 22:31
aj168211-Jan-05 22:31 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
ThatsAlok11-Jan-05 23:53
ThatsAlok11-Jan-05 23:53 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
aj168212-Jan-05 0:45
aj168212-Jan-05 0:45 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
Cedric Moonen12-Jan-05 1:03
Cedric Moonen12-Jan-05 1:03 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
aj168212-Jan-05 1:13
aj168212-Jan-05 1:13 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
Cedric Moonen12-Jan-05 1:24
Cedric Moonen12-Jan-05 1:24 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
ThatsAlok12-Jan-05 1:23
ThatsAlok12-Jan-05 1:23 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
digwizfox13-Jan-05 6:49
digwizfox13-Jan-05 6:49 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
aj168213-Jan-05 7:19
aj168213-Jan-05 7:19 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
digwizfox13-Jan-05 7:45
digwizfox13-Jan-05 7:45 
QuestionCDialog Help urgent???? Pin
nutkase11-Jan-05 21:45
nutkase11-Jan-05 21:45 
AnswerRe: CDialog Help urgent???? Pin
toxcct11-Jan-05 22:29
toxcct11-Jan-05 22:29 
GeneralRe: CDialog Help urgent???? Pin
nutkase12-Jan-05 0:37
nutkase12-Jan-05 0:37 
GeneralRe: CDialog Help urgent???? Pin
toxcct12-Jan-05 21:09
toxcct12-Jan-05 21:09 
AnswerRe: CDialog Help urgent???? Pin
Martin Koorts12-Jan-05 0:04
Martin Koorts12-Jan-05 0:04 
GeneralRe: CDialog Help urgent???? Pin
nutkase12-Jan-05 0:29
nutkase12-Jan-05 0:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.