From def5c50960eea4c112647f88361a3ae7155901a8 Mon Sep 17 00:00:00 2001 From: egor-tensin Date: Tue, 4 Jul 2023 00:48:00 +0000 Subject: =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20egor-tensin/wina?= =?UTF-8?q?pi-common@0c196cbe8b4927c78c02b2c7312fc69a507db845=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classwinapi_1_1Process.html | 697 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 697 insertions(+) create mode 100644 classwinapi_1_1Process.html (limited to 'classwinapi_1_1Process.html') diff --git a/classwinapi_1_1Process.html b/classwinapi_1_1Process.html new file mode 100644 index 0000000..94d60f9 --- /dev/null +++ b/classwinapi_1_1Process.html @@ -0,0 +1,697 @@ + + + + + + + +winapi_common: winapi::Process Class Reference + + + + + + + + + +
+
+ + + + + + +
+
winapi_common +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
winapi::Process Class Reference
+
+
+ +

Create a new process or open an existing process. + More...

+ + + + +

+Public Types

+using ID = DWORD
 
+ + + + + + + + + + + + + + + + + +

+Public Member Functions

ID get_id () const
 
const Handleget_handle () const
 
bool is_running () const
 
void wait () const
 
void terminate (int ec=0) const
 
void shut_down (int ec=0) const
 
int get_exit_code () const
 
std::string get_exe_path () const
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

static Process create (ProcessParameters)
 
static Process create (const CommandLine &)
 
static Process create (const CommandLine &, process::IO)
 
static Process shell (const ShellParameters &)
 
static Process shell (const CommandLine &)
 
static Process current ()
 
static Process open (ID id, DWORD permissions=default_permissions())
 
static Process open_r (ID)
 
static DWORD default_permissions ()
 
static DWORD read_permissions ()
 
static Resource get_resource (uint32_t id)
 
static std::string get_resource_string (uint32_t id)
 
+

Detailed Description

+

Create a new process or open an existing process.

+ +

Definition at line 54 of file process.hpp.

+

Member Function Documentation

+ +

◆ create() [1/3]

+ +
+
+ + + + + +
+ + + + + + + + +
Process winapi::Process::create (ProcessParameters params)
+
+static
+
+

Create a new process using ProcessParameters.

+ +

Definition at line 241 of file process.cpp.

+ +
+
+ +

◆ create() [2/3]

+ +
+
+ + + + + +
+ + + + + + + + +
Process winapi::Process::create (const CommandLinecmd_line)
+
+static
+
+

Create a new process using the given command line.

+ +

Definition at line 245 of file process.cpp.

+ +
+
+ +

◆ create() [3/3]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Process winapi::Process::create (const CommandLinecmd_line,
process::IO io 
)
+
+static
+
+

Create a new process using the given command line and IO settings.

+ +

Definition at line 250 of file process.cpp.

+ +
+
+ +

◆ shell() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
Process winapi::Process::shell (const ShellParametersparams)
+
+static
+
+

Create a new shell process using ShellParameters.

+ +

Definition at line 256 of file process.cpp.

+ +
+
+ +

◆ shell() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
Process winapi::Process::shell (const CommandLinecmd_line)
+
+static
+
+

Create a new shell process using the given command line.

+ +

Definition at line 260 of file process.cpp.

+ +
+
+ +

◆ current()

+ +
+
+ + + + + +
+ + + + + + + +
Process winapi::Process::current ()
+
+static
+
+

Open the current process.

+ +

Definition at line 265 of file process.cpp.

+ +
+
+ +

◆ open()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Process winapi::Process::open (ID id,
DWORD permissions = default_permissions() 
)
+
+static
+
+

Open an existing process.

Parameters
+ + + +
idProcess ID.
permissionsRequired permissions.
+
+
+ +

Definition at line 269 of file process.cpp.

+ +
+
+ +

◆ open_r()

+ +
+
+ + + + + +
+ + + + + + + + +
Process winapi::Process::open_r (ID id)
+
+static
+
+

Open an existing process with read permissions.

+ +

Definition at line 273 of file process.cpp.

+ +
+
+ +

◆ default_permissions()

+ +
+
+ + + + + +
+ + + + + + + +
DWORD winapi::Process::default_permissions ()
+
+static
+
+

Permissions that allow to query process's status.

+ +

Definition at line 277 of file process.cpp.

+ +
+
+ +

◆ read_permissions()

+ +
+
+ + + + + +
+ + + + + + + +
DWORD winapi::Process::read_permissions ()
+
+static
+
+

Permissions that allows to read process's memory.

+ +

Definition at line 281 of file process.cpp.

+ +
+
+ +

◆ get_id()

+ +
+
+ + + + + +
+ + + + + + + +
ID winapi::Process::get_id () const
+
+inline
+
+

Get this process's ID.

+ +

Definition at line 87 of file process.hpp.

+ +
+
+ +

◆ get_handle()

+ +
+
+ + + + + +
+ + + + + + + +
const Handle& winapi::Process::get_handle () const
+
+inline
+
+

Get this process's handle.

+ +

Definition at line 89 of file process.hpp.

+ +
+
+ +

◆ is_running()

+ +
+
+ + + + + + + +
bool winapi::Process::is_running () const
+
+

Check if this process is running (i.e. not terminated).

+ +

Definition at line 285 of file process.cpp.

+ +
+
+ +

◆ wait()

+ +
+
+ + + + + + + +
void winapi::Process::wait () const
+
+

Wait for the process to terminate.

+ +

Definition at line 301 of file process.cpp.

+ +
+
+ +

◆ terminate()

+ +
+
+ + + + + + + + +
void winapi::Process::terminate (int ec = 0) const
+
+

Make this process terminate with an exit code.

+ +

Definition at line 315 of file process.cpp.

+ +
+
+ +

◆ shut_down()

+ +
+
+ + + + + + + + +
void winapi::Process::shut_down (int ec = 0) const
+
+

Same as calling terminate() and wait().

+ +

Definition at line 321 of file process.cpp.

+ +
+
+ +

◆ get_exit_code()

+ +
+
+ + + + + + + +
int winapi::Process::get_exit_code () const
+
+

Get terminated process's exit code.

+ +

Definition at line 326 of file process.cpp.

+ +
+
+ +

◆ get_exe_path()

+ +
+
+ + + + + + + +
std::string winapi::Process::get_exe_path () const
+
+

Get this process's executable path.

+ +

Definition at line 342 of file process.cpp.

+ +
+
+ +

◆ get_resource()

+ +
+
+ + + + + +
+ + + + + + + + +
Resource winapi::Process::get_resource (uint32_t id)
+
+static
+
+

Get a binary resource from the process's executable.

+ +

Definition at line 370 of file process.cpp.

+ +
+
+ +

◆ get_resource_string()

+ +
+
+ + + + + +
+ + + + + + + + +
std::string winapi::Process::get_resource_string (uint32_t id)
+
+static
+
+

Get a string resource from the process's executable.

Returns
UTF-8 string.
+ +

Definition at line 358 of file process.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + -- cgit v1.2.3