blob: 007dd3ec444cec8b95274e295efcbfc99f759b27 [file] [log] [blame]
#pragma once
//-------------------------------------------------------------------------------------------------
// <copyright file="procutil.h" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// The use and distribution terms for this software are covered by the
// Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php)
// which can be found in the file CPL.TXT at the root of this distribution.
// By using this software in any fashion, you are agreeing to be bound by
// the terms of this license.
//
// You must not remove this notice, or any other, from this software.
// </copyright>
//
// <summary>
// Header for proces helper functions.
// </summary>
//-------------------------------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
HRESULT DAPI ProcExecute(
__in_z LPWSTR wzCommand,
__out HANDLE *phProcess,
__out_opt HANDLE *phChildStdIn,
__out_opt HANDLE *phChildStdOutErr
);
HRESULT DAPI ProcWaitForCompletion(
__in HANDLE hProcess,
__in DWORD dwTimeout,
__out DWORD *pReturnCode
);
HRESULT DAPI ProcWaitForIds(
__in_ecount(cProcessIds) const DWORD* pdwProcessIds,
__in DWORD cProcessIds,
__in DWORD dwMilliseconds
);
HRESULT DAPI ProcCloseIds(
__in_ecount(cProcessIds) const DWORD* pdwProcessIds,
__in DWORD cProcessIds
);
// following code in proc2utl.cpp due to dependency on PSAPI.DLL.
HRESULT DAPI ProcFindAllIdsFromExeName(
__in_z LPCWSTR wzExeName,
__out DWORD** ppdwProcessIds,
__out DWORD* pcProcessIds
);
#ifdef __cplusplus
}
#endif