PsApiEnumProcesses Method
Retrieves the process identifier for each process object in the system.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("PsApi.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool EnumProcesses(
uint[] idProcess,
uint cb,
out uint refNeeded
)
<DllImportAttribute("PsApi.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function EnumProcesses (
<OutAttribute> idProcess As UInteger(),
cb As UInteger,
<OutAttribute> ByRef refNeeded As UInteger
) As Boolean
Dim idProcess As UInteger()
Dim cb As UInteger
Dim refNeeded As UInteger
Dim returnValue As Boolean
returnValue = PsApi.EnumProcesses(idProcess,
cb, refNeeded)
public:
[DllImportAttribute(L"PsApi.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static bool EnumProcesses(
[InAttribute] [OutAttribute] array<unsigned int>^ idProcess,
unsigned int cb,
[OutAttribute] unsigned int% refNeeded
)
[<DllImportAttribute("PsApi.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member EnumProcesses :
idProcess : uint32[] byref *
cb : uint32 *
refNeeded : uint32 byref -> bool
No code example is currently available or this language may not be supported.
- idProcess UInt32
-
A pointer to an array that receives the list of process identifiers.
- cb UInt32
-
The size of the pProcessIds array, in bytes.
- refNeeded UInt32
-
The number of bytes returned in the pProcessIds array.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.