|
#ifndef _Process_h__
#define _Process_h__
#if _WIN32_WCE >= 300
# include <tlhelp32.h>
#else
# include <toolhelp.h>
#endif
#define PROCESSUTIL_API
//
// A bunch of process information held in a structure
//
typedef struct tagPROCESS_DESC
{
DWORD m_dwId; // Process ID
BSTR m_bstrProcess; // Process Name
}
PROCESS_DESC, *PPROCESS_DESC;
//
// A list of processes, for simple output
//
typedef struct tagPROCESS_DESC_LIST
{
int m_nProcesses;
PROCESS_DESC* m_pProcessList;
}
PROCESS_DESC_LIST, *PPROCESS_DESC_LIST;
#ifdef __cplusplus
extern "C"
{
#endif
//
// Returns a list of all the processes in a system, pass in the address of
// an uninitialized structure
//
PROCESSUTIL_API BOOL GetProcessList(/*in,out*/ PROCESS_DESC_LIST* pProcessList);
//
// Frees the process list allocated by GetProcessList()
//
PROCESSUTIL_API VOID FreeProcessList(/*in*/ PROCESS_DESC_LIST* pProcessList);
//
// Kill a process given the process Id, kills Service processes too!
//
PROCESSUTIL_API BOOL KillProcessId(/*in*/ DWORD dwId);
#if defined(_WIN32_WCE_EMULATION)
# pragma comment(lib, "toolhelp.lib")
#else
# pragma comment(lib, "toolhelp.lib")
#endif
#ifdef __cplusplus
}
#endif
#endif // _Process_h__
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.