xtd 0.2.0
process_start_info.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <map>
6#include <memory>
7#include <string>
9#include "../core_export.hpp"
10#include "../object.hpp"
13
15namespace xtd {
17 namespace diagnostics {
40 public:
42
47 process_start_info() = default;
48
54
61
64 process_start_info& operator =(const process_start_info&) = default;
67
69
73 const xtd::string& arguments() const noexcept;
77 process_start_info& arguments(const xtd::string& value) noexcept;
78
82 bool create_no_window() const noexcept;
87 process_start_info& create_no_window(bool value) noexcept;
88
91 const xtd::string& domain() const noexcept;
95 process_start_info& domain(const xtd::string& value) noexcept;
96
101 const std::map<xtd::string, xtd::string>& environment() const noexcept;
106 std::map<xtd::string, xtd::string>& environment() noexcept;
107
111 const std::map<xtd::string, xtd::string>& environment_variables() const noexcept;
115 std::map<xtd::string, xtd::string>& environment_variables() noexcept;
116
120 bool error_dialog() const noexcept;
125 process_start_info& error_dialog(bool value) noexcept;
126
136
141 const xtd::string& file_name() const noexcept;
147 process_start_info& file_name(const xtd::string& value) noexcept;
149 process_start_info& file_name(const char* value) noexcept;
151
156 bool load_user_profile() const noexcept;
163
171 const xtd::security::secure_string& password() const noexcept;
180 process_start_info& password(const xtd::security::secure_string& value) noexcept;
181
184 xtd::string password_in_clear_text() const noexcept;
188 process_start_info& password_in_clear_text(const xtd::string& value) noexcept;
189
295 bool redirect_standard_error() const noexcept;
403
465 bool redirect_standard_input() const noexcept;
529
649 bool redirect_standard_output() const noexcept;
771
777 const xtd::string& user_name() const noexcept;
784 process_start_info& user_name(const xtd::string& value) noexcept;
785
794 bool use_shell_execute() const noexcept;
805
810 xtd::string verb() const noexcept;
816 process_start_info& verb(const xtd::string& value) noexcept;
817
822 xtd::collections::generic::list<xtd::string> verbs() const;
823
833
842 const xtd::string& working_directory() const noexcept;
852 process_start_info& working_directory(const xtd::string& value) noexcept;
854
855 private:
856 xtd::string file_name_;
857 xtd::string arguments_;
858 bool create_no_window_ = false;
859 xtd::string domain_;
860 bool error_dialog_ = false;
861 intptr error_dialog_parent_handle_ = 0;
862 std::map<xtd::string, xtd::string> environment_variables_;
863 bool load_user_profile_ = false;
864 xtd::security::secure_string password_;
865 bool redirect_standard_error_ = false;
866 bool redirect_standard_input_ = false;
867 bool redirect_standard_output_ = false;
868 xtd::string user_name_;
869 bool use_shell_execute_ = true;
870 xtd::string verb_;
872 xtd::string working_directory_;
873 };
874 }
875}
bool error_dialog() const noexcept
Gets a value indicating whether an error dialog box is displayed to the user if the process cannot be...
xtd::diagnostics::process_window_style window_style() const noexcept
Gets the window state to use when the process is started.
const xtd::security::secure_string & password() const noexcept
Gets a secure string that contains the user password to use when starting the process.
bool redirect_standard_output() const noexcept
Gets a value that indicates whether the textual output of an application is written to the xtd::diagn...
process_start_info(const xtd::string &file_name)
Initializes a new instance of the xtd::diagnostics::process_start_info class and specifies a file nam...
process_start_info(const xtd::string &file_name, const xtd::string &arguments)
Initializes a new instance of the xtd::diagnostics::process_start_info class, specifies an applicatio...
bool redirect_standard_input() const noexcept
Gets a value indicating whether the input for an application is read from the Process....
bool redirect_standard_error() const noexcept
Gets a value that indicates whether the error output of an application is written to the xtd::diagnos...
const std::map< xtd::string, xtd::string > & environment() const noexcept
Gets the environment variables that apply to this process and its child processes.
const xtd::string & user_name() const noexcept
Gets the user name to be used when starting the process.
bool create_no_window() const noexcept
Gets a value indicating whether to start the process in a new window.
const std::map< xtd::string, xtd::string > & environment_variables() const noexcept
Gets search paths for files, directories for temporary files, application-specific options,...
bool load_user_profile() const noexcept
Gets a value that indicates whether the Windows user profile is to be loaded from the registry.
intptr error_dialog_parent_handle() const noexcept
Gets the window handle to use when an error dialog box is shown for a process that cannot be started.
xtd::collections::generic::list< xtd::string > verbs() const
Gets the set of verbs associated with the type of file specified by the xtd::diagnostics::process_sta...
const xtd::string & domain() const noexcept
Gets a value that identifies the domain to use when starting the process.
const xtd::string & arguments() const noexcept
Gets the set of command-line arguments to use when starting the application.
const xtd::string & working_directory() const noexcept
When the xtd::diagnostics::process_start_info::use_shell_execute property is false,...
process_start_info()=default
Initializes a new instance of the xtd::diagnostics::process_start_info class without specifying a fil...
const xtd::string & file_name() const noexcept
Gets the application or document to start.
xtd::string password_in_clear_text() const noexcept
Gets the user password in clear text to use when starting the process.
xtd::string verb() const noexcept
Gets the verb to use when opening the application or document specified by the FileName property.
bool use_shell_execute() const noexcept
Gets a value indicating whether to use the operating system shell to start the process.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:44
Contains core_export_ keyword.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
process_window_style
Specified how a new window should appear when the system starts a process.
Definition process_window_style.hpp:24
@ normal
Specifies that the process has no special scheduling needs.
Definition process_priority_class.hpp:28
Contains xtd::collections::generic::list <value_t> class.
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:10
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
Provides the underlying structure of the security system, including base classes for permissions.
Definition secure_string.hpp:11
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::object class.
Contains xtd::diagnostics::process_window_style enum class.
Contains xtd::security::secure_string class.