00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00047 #ifndef WINSTL_INCL_WINSTL_PROCESS_H_FUNCTIONS
00048 #define WINSTL_INCL_WINSTL_PROCESS_H_FUNCTIONS
00049
00050 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00051 # define WINSTL_VER_WINSTL_PROCESS_H_FUNCTIONS_MAJOR 1
00052 # define WINSTL_VER_WINSTL_PROCESS_H_FUNCTIONS_MINOR 0
00053 # define WINSTL_VER_WINSTL_PROCESS_H_FUNCTIONS_REVISION 5
00054 # define WINSTL_VER_WINSTL_PROCESS_H_FUNCTIONS_EDIT 18
00055 #endif
00056
00057
00058
00059
00060
00061 #ifndef WINSTL_INCL_WINSTL_H_WINSTL
00062 # include <winstl/winstl.h>
00063 #endif
00064
00065 #ifndef STLSOFT_INCL_H_STRING
00066 # define STLSOFT_INCL_H_STRING
00067 # include <string.h>
00068 #endif
00069
00070
00071
00072
00073
00074 #if !defined(_WINSTL_NO_NAMESPACE) && \
00075 !defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00076 # if defined(_STLSOFT_NO_NAMESPACE)
00077
00078 namespace winstl
00079 {
00080 # else
00081
00082
00083 namespace stlsoft
00084 {
00085
00086 namespace winstl_project
00087 {
00088
00089 # endif
00090 #endif
00091
00092
00093
00094
00095
00100 STLSOFT_INLINE BOOL winstl__CreateProcessFEA(ws_char_a_t const* cmdLine, DWORD flags, void const* envBlock)
00101 {
00102 STARTUPINFO si;
00103 PROCESS_INFORMATION pi;
00104 BOOL b;
00105
00106 STLSOFT_NS_GLOBAL(memset)(&si, 0, sizeof(si));
00107
00108 b = STLSOFT_NS_GLOBAL(CreateProcessA)(NULL, stlsoft_const_cast(ws_char_a_t*, cmdLine), NULL, NULL, FALSE, flags, stlsoft_const_cast(void*, envBlock), NULL, &si, &pi);
00109
00110 if(b)
00111 {
00112 STLSOFT_NS_GLOBAL(CloseHandle)(pi.hProcess);
00113 STLSOFT_NS_GLOBAL(CloseHandle)(pi.hThread);
00114 }
00115
00116 return b;
00117 }
00118
00123 STLSOFT_INLINE BOOL winstl__CreateProcessEA(ws_char_a_t const* cmdLine, void const* envBlock)
00124 {
00125 return winstl__CreateProcessFEA(cmdLine, 0, envBlock);
00126 }
00127
00132 STLSOFT_INLINE BOOL winstl__CreateProcess0A(ws_char_a_t const* cmdLine)
00133 {
00134 return winstl__CreateProcessEA(cmdLine, NULL);
00135 }
00136
00137
00138
00139
00140
00141 #ifdef STLSOFT_DOCUMENTATION_SKIP_SECTION
00142 namespace winstl
00143 {
00144 #endif
00145
00146
00147
00148
00149
00150 #ifdef __cplusplus
00151
00156 inline BOOL CreateProcess(ws_char_a_t const* cmdLine, DWORD flags, void const* envBlock)
00157 {
00158 return winstl__CreateProcessFEA(cmdLine, flags, envBlock);
00159 }
00160
00165 inline BOOL CreateProcess(ws_char_a_t const* cmdLine, void const* envBlock)
00166 {
00167 return winstl__CreateProcessEA(cmdLine, envBlock);
00168 }
00169
00174 inline BOOL CreateProcess(ws_char_a_t const* cmdLine)
00175 {
00176 return winstl__CreateProcess0A(cmdLine);
00177 }
00178
00179 #endif
00180
00181
00182
00183 #ifndef _WINSTL_NO_NAMESPACE
00184 # if defined(_STLSOFT_NO_NAMESPACE) || \
00185 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00186 }
00187 # else
00188 }
00189 }
00190 # endif
00191 #endif
00192
00193
00194
00195 #endif
00196
00197