xtd 0.2.0
Loading...
Searching...
No Matches
process_start_info.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <map>
6#include <memory>
7#include <string>
10#include "../core_export.hpp"
11#include "../object.hpp"
14
16namespace xtd {
18 namespace diagnostics {
41 public:
43
48 process_start_info() = default;
49
55
62
65 auto operator =(const xtd::diagnostics::process_start_info&) -> process_start_info& = default;
68
70
74 [[nodiscard]] auto arguments() const noexcept -> const xtd::string&;
78 auto arguments(const xtd::string& value) noexcept -> xtd::diagnostics::process_start_info&;
79
83 [[nodiscard]] auto create_no_window() const noexcept -> bool;
88 auto create_no_window(bool value) noexcept -> xtd::diagnostics::process_start_info&;
89
92 [[nodiscard]] auto domain() const noexcept -> const xtd::string&;
96 auto domain(const xtd::string& value) noexcept -> xtd::diagnostics::process_start_info&;
97
102 [[nodiscard]] auto environment() const noexcept -> const xtd::collections::generic::idictionary<xtd::string, xtd::string>& ;
107 auto environment() noexcept -> xtd::collections::generic::idictionary<xtd::string, xtd::string>& ;
108
112 [[nodiscard]] auto environment_variables() const noexcept -> const xtd::collections::generic::idictionary<xtd::string, xtd::string>& ;
116 auto environment_variables() noexcept -> xtd::collections::generic::idictionary<xtd::string, xtd::string>& ;
117
121 [[nodiscard]] auto error_dialog() const noexcept -> bool;
126 auto error_dialog(bool value) noexcept -> xtd::diagnostics::process_start_info&;
127
131 [[nodiscard]] auto error_dialog_parent_handle() const noexcept -> xtd::intptr;
137
142 [[nodiscard]] auto file_name() const noexcept -> const xtd::string&;
148 auto file_name(const xtd::string& value) noexcept -> xtd::diagnostics::process_start_info&;
150 auto file_name(const char* value) noexcept -> xtd::diagnostics::process_start_info&;
152
157 [[nodiscard]] auto load_user_profile() const noexcept -> bool;
163 auto load_user_profile(bool value) noexcept -> xtd::diagnostics::process_start_info&;
164
172 [[nodiscard]] auto password() const noexcept -> const xtd::security::secure_string&;
181 auto password(const xtd::security::secure_string& value) noexcept -> xtd::diagnostics::process_start_info&;
182
185 [[nodiscard]] auto password_in_clear_text() const noexcept -> xtd::string;
189 auto password_in_clear_text(const xtd::string& value) noexcept -> xtd::diagnostics::process_start_info&;
190
296 [[nodiscard]] auto redirect_standard_error() const noexcept -> bool;
404
466 [[nodiscard]] auto redirect_standard_input() const noexcept -> bool;
530
650 [[nodiscard]] auto redirect_standard_output() const noexcept -> bool;
772
778 [[nodiscard]] auto user_name() const noexcept -> const xtd::string&;
785 auto user_name(const xtd::string& value) noexcept -> xtd::diagnostics::process_start_info&;
786
795 [[nodiscard]] bool use_shell_execute() const noexcept;
805 auto use_shell_execute(bool value) noexcept -> xtd::diagnostics::process_start_info&;
806
811 [[nodiscard]] auto verb() const noexcept -> xtd::string;
817 auto verb(const xtd::string& value) noexcept -> xtd::diagnostics::process_start_info&;
818
823 [[nodiscard]] auto verbs() const -> xtd::collections::generic::list<xtd::string>;
824
828 [[nodiscard]] auto window_style() const noexcept -> xtd::diagnostics::process_window_style;
834
843 [[nodiscard]] auto working_directory() const noexcept -> const xtd::string&;
853 auto working_directory(const xtd::string& value) noexcept -> xtd::diagnostics::process_start_info&;
855
856 private:
857 xtd::string file_name_;
858 xtd::string arguments_;
859 bool create_no_window_ = false;
860 xtd::string domain_;
861 bool error_dialog_ = false;
862 xtd::intptr error_dialog_parent_handle_ = 0;
863 xtd::collections::generic::dictionary<xtd::string, xtd::string> environment_variables_;
864 bool load_user_profile_ = false;
865 xtd::security::secure_string password_;
866 bool redirect_standard_error_ = false;
867 bool redirect_standard_input_ = false;
868 bool redirect_standard_output_ = false;
869 xtd::string user_name_;
870 bool use_shell_execute_ = false;
871 xtd::string verb_;
873 xtd::string working_directory_;
874 };
875 }
876}
Specifies a set of values that are used when you start a process.
Definition process_start_info.hpp:40
auto load_user_profile() const noexcept -> bool
Gets a value that indicates whether the Windows user profile is to be loaded from the registry.
auto user_name() const noexcept -> const xtd::string &
Gets the user name to be used when starting the process.
auto environment() const noexcept -> const xtd::collections::generic::idictionary< xtd::string, xtd::string > &
Gets the environment variables that apply to this process and its child processes.
auto password() const noexcept -> const xtd::security::secure_string &
Gets a secure string that contains the user password to use when starting the process.
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...
auto password_in_clear_text() const noexcept -> xtd::string
Gets the user password in clear text to use when starting the process.
auto redirect_standard_output() const noexcept -> bool
Gets a value that indicates whether the textual output of an application is written to the xtd::diagn...
auto domain() const noexcept -> const xtd::string &
Gets a value that identifies the domain to use when starting the process.
auto error_dialog() const noexcept -> bool
Gets a value indicating whether an error dialog box is displayed to the user if the process cannot be...
auto window_style() const noexcept -> xtd::diagnostics::process_window_style
Gets the window state to use when the process is started.
auto verbs() const -> xtd::collections::generic::list< xtd::string >
Gets the set of verbs associated with the type of file specified by the xtd::diagnostics::process_sta...
auto environment_variables() const noexcept -> const xtd::collections::generic::idictionary< xtd::string, xtd::string > &
Gets search paths for files, directories for temporary files, application-specific options,...
auto working_directory() const noexcept -> const xtd::string &
When the xtd::diagnostics::process_start_info::use_shell_execute property is false,...
auto create_no_window() const noexcept -> bool
Gets a value indicating whether to start the process in a new window.
auto arguments() const noexcept -> const xtd::string &
Gets the set of command-line arguments to use when starting the application.
auto error_dialog_parent_handle() const noexcept -> xtd::intptr
Gets the window handle to use when an error dialog box is shown for a process that cannot be started.
auto redirect_standard_error() const noexcept -> bool
Gets a value that indicates whether the error output of an application is written to the xtd::diagnos...
auto redirect_standard_input() const noexcept -> bool
Gets a value indicating whether the input for an application is read from the Process....
auto file_name() const noexcept -> const xtd::string &
Gets the application or document to start.
auto verb() const noexcept -> xtd::string
Gets the verb to use when opening the application or document specified by the FileName property.
process_start_info()=default
Initializes a new instance of the xtd::diagnostics::process_start_info class without specifying a fil...
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:45
Contains core_export_ keyword.
Contains xtd::collections::generic::dictionary <key_t, value_t> class.
#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
std::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 <type_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.