![]() |
boost::process::win32_child — Win32 implementation of the Child concept.
class win32_child : public boost::process::child { public: // construct/copy/destruct win32_child(const PROCESS_INFORMATION &, unspecified, unspecified, unspecified); // public member functions DWORD get_id(void) const; HANDLE get_primary_thread_handle(void) const; DWORD get_primary_thread_id(void) const; };
The win32_child class implements the Child concept in a Win32 operating system.
A Win32 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 Win32-specific launcher (win32_launcher), 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.
win32_child
construct/copy/destructwin32_child(const PROCESS_INFORMATION & pi, unspecified fhstdin, unspecified fhstdout, unspecified fhstderr);
Creates a new child object that represents the process described by the si 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.
This constructor is protected because the library user has no business in creating representations of live processes himself; the library takes care of that in all cases.
win32_child
public member functionsDWORD get_id(void ) const;
Returns a system-wide value that identifies the process. This is the value of the dwProcessId field in the PROCESS_INFORMATION structure returned by CreateProcess().
get_handle()
HANDLE get_primary_thread_handle(void ) const;
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().
get_primary_thread_id()
DWORD get_primary_thread_id(void ) const;
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().
get_primary_thread_handle()
Copyright © 2006 Julio M. Merino Vidal |