Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

57 lines
1.6 KiB

//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1994.
//
// File: process.hxx
//
// Contents: CProcess class
// CServiceProcess class
//
// History: 07-Jun-94 DwightKr Created
//
//--------------------------------------------------------------------------
#pragma once
#include <ciintf.h>
//+-------------------------------------------------------------------------
//
// Class: CProcess
//
// Purpose: Abstraction of the Win32 CreateProcess call, and allows the
// Dacl bits to be set.
//
// History: 06-Jun-94 DwightKr Created
//
//--------------------------------------------------------------------------
class CProcess
{
public:
CProcess( const WCHAR *wcsImageName,
const WCHAR *wcsCommandLine,
BOOL fCreateSuspended,
ICiCAdviseStatus * pAdviseStatus = 0 );
~CProcess();
void Resume();
void Terminate() { TerminateProcess( _piProcessInfo.hProcess, 0 ); }
const PROCESS_INFORMATION & GetProcessInformation() { return _piProcessInfo; }
void WaitForDeath( DWORD dwTimeout=INFINITE );
HANDLE GetHandle() const
{
return _piProcessInfo.hProcess;
}
private:
HANDLE GetProcessToken();
PROCESS_INFORMATION _piProcessInfo;
ICiCAdviseStatus * _pAdviseStatus;
};