boost::process::win32_child Class Reference

#include <win32_child.hpp>

Inheritance diagram for boost::process::win32_child:

boost::process::child boost::process::process

List of all members.

Public Member Functions

 win32_child (const PROCESS_INFORMATION &pi, detail::file_handle fhstdin, detail::file_handle fhstdout, detail::file_handle fhstderr)
HANDLE get_handle () const
HANDLE get_primary_thread_handle () const
DWORD get_primary_thread_id () const

Detailed Description

Windows implementation of the Child concept.

The win32_child class implements the Child concept in a Windows operating system.

A Windows child differs from a regular child (represented by a child object) in that it holds additional information about a process. Aside from the standard handle, it also includes a handle to the process' main thread, together with identifiers to both entities.

This class is built on top of the generic child so as to allow its trivial adoption. When a program is changed to use the Windows-specific context (win32_context), it will most certainly need to migrate its use of the child class to win32_child. Doing so is only a matter of redefining the appropriate object and later using the required extra features: there should be no need to modify the existing code (e.g. method calls) in any other way.

Constructor & Destructor Documentation

boost::process::win32_child::win32_child ( const PROCESS_INFORMATION &  pi,
detail::file_handle  fhstdin,
detail::file_handle  fhstdout,
detail::file_handle  fhstderr 
) [inline]

Constructs a new Windows child object representing a just spawned child process.

Creates a new child object that represents the process described by the pi structure.

The fhstdin, fhstdout and fhstderr parameters hold the communication streams used to interact with the child process if the launcher configured redirections. See the parent class' constructor for more details on these.

See also:

Member Function Documentation

HANDLE boost::process::win32_child::get_handle (  )  const [inline]

Returns the process handle.

Returns a process-specific handle that can be used to access the process. This is the value of the hProcess field in the PROCESS_INFORMATION structure returned by CreateProcess().

See also:

HANDLE boost::process::win32_child::get_primary_thread_handle (  )  const [inline]

Returns the primary thread's handle.

Returns a handle to the primary thread of the new process. This is the value of the hThread field in the PROCESS_INFORMATION structure returned by CreateProcess().

See also:

DWORD boost::process::win32_child::get_primary_thread_id (  )  const [inline]

Returns the primary thread's identifier.

Returns a system-wide value that identifies the process's primary thread. This is the value of the dwThreadId field in the PROCESS_INFORMATION structure returned by CreateProcess().

See also:

The documentation for this class was generated from the following file:

Generated on Mon Sep 22 01:00:43 2008 by  doxygen 1.5.5