Objects Inherited Through a CreateProcess Call

Last reviewed: December 16, 1996
Article ID: Q83298
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT versions 3.5, 3.51, and 4.0
        - Microsoft Windows 95 version 4.0
    

The objects inherited by a process started by a call to CreateProcess() are those objects that you can get a handle to and on which you can use the CloseHandle() function. These objects include the following:

   Processes
   Events
   Semaphores
   Mutexes
   Files (including file mappings)
   Standard input, output, or error devices

However, the new process will only inherit objects that were marked inheritable by the old process.

These are duplicate handles. Each process maintains memory for its own handle table. If one of the processes modifies its handle (for example, closes it or changes the mode for the console handle), other processes will not be affected.

Processes will also inherit environment variables, the current directory, and priority class.


KBCategory: kbprg
KBSubcategory: BseProcThrd
Additional reference words: 3.50 3.51 4.00 95


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.