Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionOpenPrinter() API Pin
msr_codeproject21-Mar-11 22:41
msr_codeproject21-Mar-11 22:41 
AnswerRe: OpenPrinter() API Pin
Richard MacCutchan21-Mar-11 23:57
mveRichard MacCutchan21-Mar-11 23:57 
QuestionMFC: How to set the focus to the previously focused window? Pin
Erik21-Mar-11 19:48
Erik21-Mar-11 19:48 
AnswerRe: MFC: How to set the focus to the previously focused window? Pin
tagopi21-Mar-11 22:16
tagopi21-Mar-11 22:16 
GeneralRe: MFC: How to set the focus to the previously focused window? Pin
msr_codeproject21-Mar-11 22:32
msr_codeproject21-Mar-11 22:32 
AnswerRe: MFC: How to set the focus to the previously focused window? Pin
Hans Dietrich22-Mar-11 4:24
mentorHans Dietrich22-Mar-11 4:24 
GeneralRe: MFC: How to set the focus to the previously focused window? Pin
Emilio Garavaglia22-Mar-11 22:20
Emilio Garavaglia22-Mar-11 22:20 
QuestionHandle Inheritance in Windows [modified] Pin
Sudhan Gandhi21-Mar-11 0:59
Sudhan Gandhi21-Mar-11 0:59 
Hi,

I am looking for code sample which will explain how to actually pass handles from parent to child process.

I konw:

A child process can inherit handles from its parent process. An inherited handle is valid only in the context of the child process. To enable a child process to inherit open handles from its parent process, use the following steps.

1.Create the handle with the bInheritHandle member of the SECURITY_ATTRIBUTES structure set to TRUE.
2.Create the child process using the CreateProcess function, with the bInheritHandles parameter set to TRUE.

Can someone please share some code sample which would help me understand how to actually use the passed handle in child process.

Thanks in advance!!!

modified on Monday, March 21, 2011 7:13 AM

AnswerRe: Handle Inheritance in Windows Pin
«_Superman_»21-Mar-11 1:24
professional«_Superman_»21-Mar-11 1:24 
GeneralRe: Handle Inheritance in Windows Pin
Sudhan Gandhi21-Mar-11 2:01
Sudhan Gandhi21-Mar-11 2:01 
GeneralRe: Handle Inheritance in Windows Pin
Richard MacCutchan21-Mar-11 2:57
mveRichard MacCutchan21-Mar-11 2:57 
GeneralRe: Handle Inheritance in Windows Pin
Sudhan Gandhi21-Mar-11 4:27
Sudhan Gandhi21-Mar-11 4:27 
GeneralRe: Handle Inheritance in Windows Pin
Richard MacCutchan21-Mar-11 5:44
mveRichard MacCutchan21-Mar-11 5:44 
AnswerRe: Handle Inheritance in Windows Pin
Michael Dunn22-Mar-11 21:08
sitebuilderMichael Dunn22-Mar-11 21:08 
GeneralRe: Handle Inheritance in Windows Pin
Sudhan Gandhi22-Mar-11 23:32
Sudhan Gandhi22-Mar-11 23:32 
AnswerRe: Handle Inheritance in Windows Pin
Emilio Garavaglia22-Mar-11 22:34
Emilio Garavaglia22-Mar-11 22:34 
QuestionShowDropDown(...) error Pin
_Flaviu21-Mar-11 0:30
_Flaviu21-Mar-11 0:30 
AnswerRe: ShowDropDown(...) error Pin
Code-o-mat21-Mar-11 1:48
Code-o-mat21-Mar-11 1:48 
GeneralRe: ShowDropDown(...) error Pin
_Flaviu21-Mar-11 3:00
_Flaviu21-Mar-11 3:00 
GeneralRe: ShowDropDown(...) error Pin
Code-o-mat21-Mar-11 3:25
Code-o-mat21-Mar-11 3:25 
QuestionAutomatically Stepping over stl code in Visual Studio PinPopular
ed welch21-Mar-11 0:28
ed welch21-Mar-11 0:28 
AnswerRe: Automatically Stepping over stl code in Visual Studio PinPopular
Stefan_Lang21-Mar-11 7:32
Stefan_Lang21-Mar-11 7:32 
GeneralRe: Automatically Stepping over stl code in Visual Studio Pin
ed welch21-Mar-11 9:48
ed welch21-Mar-11 9:48 
GeneralRe: Automatically Stepping over stl code in Visual Studio Pin
Niklas L21-Mar-11 22:52
Niklas L21-Mar-11 22:52 
AnswerRe: Automatically Stepping over stl code in Visual Studio Pin
Rajesh R Subramanian22-Mar-11 5:53
professionalRajesh R Subramanian22-Mar-11 5:53 

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.