| 1 | #pragma once |
| 2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 3 | |
| 4 | |
| 5 | #ifdef __cplusplus |
| 6 | extern "C" { |
| 7 | #endif |
| 8 | |
| 9 | // structs |
| 10 | typedef struct _PROC_FILESYSTEMREDIRECTION |
| 11 | { |
| 12 | BOOL fDisabled; |
| 13 | LPVOID pvRevertState; |
| 14 | } PROC_FILESYSTEMREDIRECTION; |
| 15 | |
| 16 | HRESULT DAPI ProcElevated( |
| 17 | __in HANDLE hProcess, |
| 18 | __out BOOL* pfElevated |
| 19 | ); |
| 20 | |
| 21 | HRESULT DAPI ProcSystem( |
| 22 | __in HANDLE hProcess, |
| 23 | __out BOOL* pfSystem |
| 24 | ); |
| 25 | |
| 26 | HRESULT DAPI ProcGetTokenInformation( |
| 27 | __in HANDLE hProcess, |
| 28 | __in TOKEN_INFORMATION_CLASS tokenInformationClass, |
| 29 | __out LPVOID* ppvTokenInformation |
| 30 | ); |
| 31 | |
| 32 | HRESULT DAPI ProcHasPrivilege( |
| 33 | __in HANDLE hProcess, |
| 34 | __in LPCWSTR wzPrivilegeName, |
| 35 | __out BOOL* pfHasPrivilege |
| 36 | ); |
| 37 | |
| 38 | HRESULT DAPI ProcEnablePrivilege( |
| 39 | __in HANDLE hProcess, |
| 40 | __in LPCWSTR wzPrivilegeName |
| 41 | ); |
| 42 | |
| 43 | HRESULT DAPI ProcWow64( |
| 44 | __in HANDLE hProcess, |
| 45 | __out BOOL* pfWow64 |
| 46 | ); |
| 47 | HRESULT DAPI ProcNativeMachine( |
| 48 | __in HANDLE hProcess, |
| 49 | __out USHORT* pusNativeMachine |
| 50 | ); |
| 51 | HRESULT DAPI ProcDisableWowFileSystemRedirection( |
| 52 | __in PROC_FILESYSTEMREDIRECTION* pfsr |
| 53 | ); |
| 54 | HRESULT DAPI ProcRevertWowFileSystemRedirection( |
| 55 | __in PROC_FILESYSTEMREDIRECTION* pfsr |
| 56 | ); |
| 57 | |
| 58 | HRESULT DAPI ProcExec( |
| 59 | __in_z LPCWSTR wzExecutablePath, |
| 60 | __in_z_opt LPCWSTR wzCommandLine, |
| 61 | __in int nCmdShow, |
| 62 | __out HANDLE *phProcess |
| 63 | ); |
| 64 | HRESULT DAPI ProcExecute( |
| 65 | __in_z_opt LPCWSTR wzApplicationName, |
| 66 | __in_z LPWSTR wzCommand, |
| 67 | __out HANDLE *phProcess, |
| 68 | __out_opt HANDLE *phChildStdIn, |
| 69 | __out_opt HANDLE *phChildStdOutErr |
| 70 | ); |
| 71 | HRESULT DAPI ProcWaitForCompletion( |
| 72 | __in HANDLE hProcess, |
| 73 | __in DWORD dwTimeout, |
| 74 | __out_opt DWORD* pdwReturnCode |
| 75 | ); |
| 76 | HRESULT DAPI ProcWaitForIds( |
| 77 | __in_ecount(cProcessIds) const DWORD rgdwProcessIds[], |
| 78 | __in DWORD cProcessIds, |
| 79 | __in DWORD dwMilliseconds |
| 80 | ); |
| 81 | HRESULT DAPI ProcCloseIds( |
| 82 | __in_ecount(cProcessIds) const DWORD* pdwProcessIds, |
| 83 | __in DWORD cProcessIds |
| 84 | ); |
| 85 | |
| 86 | // following code in proc2utl.cpp due to dependency on PSAPI.DLL. |
| 87 | HRESULT DAPI ProcFindAllIdsFromExeName( |
| 88 | __in_z LPCWSTR wzExeName, |
| 89 | __out DWORD** ppdwProcessIds, |
| 90 | __out DWORD* pcProcessIds |
| 91 | ); |
| 92 | |
| 93 | // following code in proc3utl.cpp due to dependency on Wtsapi32.DLL. |
| 94 | HRESULT DAPI ProcExecuteAsInteractiveUser( |
| 95 | __in_z LPCWSTR wzExecutablePath, |
| 96 | __in_z LPCWSTR wzCommand, |
| 97 | __out HANDLE *phProcess |
| 98 | ); |
| 99 | |
| 100 | #ifdef __cplusplus |
| 101 | } |
| 102 | #endif |