Win32 API Reference

Process Functions

This section provides documentation for Win32 API functions related to process management.

CreateProcess

Creates a new process and its primary thread. The new process runs in the same address space of the calling process.

View Details
BOOL CreateProcess( [in, optional] LPCTSTR lpApplicationName, [in, out, optional] LPTSTR lpCommandLine, [in, optional] LPSECURITY_ATTRIBUTES lpProcessAttributes, [in, optional] LPSECURITY_ATTRIBUTES lpThreadAttributes, [in] BOOL bInheritHandles, [in] DWORD dwCreationFlags, [in, optional] LPVOID lpEnvironment, [in, optional] LPCTSTR lpCurrentDirectory, [in] LPSTARTUPINFO lpStartupInfo, [out] LPPROCESS_INFORMATION lpProcessInformation );

ExitProcess

Terminates the calling process and all its threads.

View Details
VOID ExitProcess( [in] UINT uExitCode );

OpenProcess

Opens an existing local process object.

View Details
HANDLE OpenProcess( [in] DWORD dwDesiredAccess, [in] BOOL bInheritHandle, [in] DWORD dwProcessId );

GetCurrentProcess

Returns a pseudo handle for the current process.

View Details
HANDLE GetCurrentProcess(void);

TerminateProcess

Terminates the specified process and its threads.

View Details
BOOL TerminateProcess( [in] HANDLE hProcess, [in] UINT uExitCode );

GetProcessId

Retrieves the process identifier of the specified process.

View Details
DWORD GetProcessId( [in] HANDLE Process );

IsWow64Process

Determines whether a process is running under WOW64.

View Details
BOOL IsWow64Process( [in] HANDLE hProcess, [out] PBOOL Wow64Process );