OLD | NEW |
(Empty) | |
| 1 #pragma once |
| 2 //------------------------------------------------------------------------------
------------------- |
| 3 // <copyright file="procutil.h" company="Outercurve Foundation"> |
| 4 // Copyright (c) 2004, Outercurve Foundation. |
| 5 // This software is released under Microsoft Reciprocal License (MS-RL). |
| 6 // The license and further copyright text can be found in the file |
| 7 // LICENSE.TXT at the root directory of the distribution. |
| 8 // </copyright> |
| 9 // |
| 10 // <summary> |
| 11 // Header for process helper functions. |
| 12 // </summary> |
| 13 //------------------------------------------------------------------------------
------------------- |
| 14 |
| 15 #ifdef __cplusplus |
| 16 extern "C" { |
| 17 #endif |
| 18 |
| 19 // structs |
| 20 typedef struct _PROC_FILESYSTEMREDIRECTION |
| 21 { |
| 22 BOOL fDisabled; |
| 23 LPVOID pvRevertState; |
| 24 } PROC_FILESYSTEMREDIRECTION; |
| 25 |
| 26 HRESULT DAPI ProcElevated( |
| 27 __in HANDLE hProcess, |
| 28 __out BOOL* pfElevated |
| 29 ); |
| 30 |
| 31 HRESULT DAPI ProcWow64( |
| 32 __in HANDLE hProcess, |
| 33 __out BOOL* pfWow64 |
| 34 ); |
| 35 HRESULT DAPI ProcDisableWowFileSystemRedirection( |
| 36 __in PROC_FILESYSTEMREDIRECTION* pfsr |
| 37 ); |
| 38 HRESULT DAPI ProcRevertWowFileSystemRedirection( |
| 39 __in PROC_FILESYSTEMREDIRECTION* pfsr |
| 40 ); |
| 41 |
| 42 HRESULT DAPI ProcExec( |
| 43 __in_z LPCWSTR wzExecutablePath, |
| 44 __in_z_opt LPCWSTR wzCommandLine, |
| 45 __in int nCmdShow, |
| 46 __out HANDLE *phProcess |
| 47 ); |
| 48 HRESULT DAPI ProcExecute( |
| 49 __in_z LPWSTR wzCommand, |
| 50 __out HANDLE *phProcess, |
| 51 __out_opt HANDLE *phChildStdIn, |
| 52 __out_opt HANDLE *phChildStdOutErr |
| 53 ); |
| 54 HRESULT DAPI ProcWaitForCompletion( |
| 55 __in HANDLE hProcess, |
| 56 __in DWORD dwTimeout, |
| 57 __out DWORD *pReturnCode |
| 58 ); |
| 59 HRESULT DAPI ProcWaitForIds( |
| 60 __in_ecount(cProcessIds) const DWORD* pdwProcessIds, |
| 61 __in DWORD cProcessIds, |
| 62 __in DWORD dwMilliseconds |
| 63 ); |
| 64 HRESULT DAPI ProcCloseIds( |
| 65 __in_ecount(cProcessIds) const DWORD* pdwProcessIds, |
| 66 __in DWORD cProcessIds |
| 67 ); |
| 68 |
| 69 // following code in proc2utl.cpp due to dependency on PSAPI.DLL. |
| 70 HRESULT DAPI ProcFindAllIdsFromExeName( |
| 71 __in_z LPCWSTR wzExeName, |
| 72 __out DWORD** ppdwProcessIds, |
| 73 __out DWORD* pcProcessIds |
| 74 ); |
| 75 |
| 76 // following code in proc3utl.cpp due to dependency on Wtsapi32.DLL. |
| 77 HRESULT DAPI ProcExecuteAsInteractiveUser( |
| 78 __in_z LPCWSTR wzExecutablePath, |
| 79 __in_z LPCWSTR wzCommand, |
| 80 __out HANDLE *phProcess |
| 81 ); |
| 82 |
| 83 #ifdef __cplusplus |
| 84 } |
| 85 #endif |
OLD | NEW |