Hi Mike, This is what I was looking for. Handles are copied in the process table of the child process if the inherit flag is set to true but how would the child process know which handle is pointing to which kernel object and which to use. This link [^] explains the concept: "To use a handle, the child process must retrieve the handle value and "know" the object to which it refers. Usually, the parent process communicates this information to the child process through its command line, environment block, or some form of interprocess communication." I was looking for an sample code showing the above step(highlighted in bold).
Sudhan Gandhi
Posts
-
Handle Inheritance in Windows [modified] -
Handle Inheritance in Windows [modified]I had seen this link. I was wondering how to use it for other type of handles (like mutex, sempahore etc, though they can be retrieved through api like OpenMutex) in child process.
-
Handle Inheritance in Windows [modified]Hi, I know how it is passed. I want to know how to retrieve and use them in child process. An example will help Sudhan
-
Handle Inheritance in Windows [modified]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
-
3DES encryption.How to specify 3DES while using EncryptMessage() API. Could you please share the code snippet if you have one.
-
3DES encryption.Hi, I wanted to use 3DES encryption in my C++/VC++ code for encypting an XML string. Could anyone please point me to some open source library which I could use directly instead of developing it all over again. Thanks in advace.
-
Creating Resource only DLL and using it in codeNice Link...