Share via


ProcessDiagnosticInfo.TryGetForProcessId(UInt32) Method

Definition

Gets a ProcessDiagnosticInfo object for the specified process.

public:
 static ProcessDiagnosticInfo ^ TryGetForProcessId(unsigned int processId);
 static ProcessDiagnosticInfo TryGetForProcessId(uint32_t const& processId);
public static ProcessDiagnosticInfo TryGetForProcessId(uint processId);
function tryGetForProcessId(processId)
Public Shared Function TryGetForProcessId (processId As UInteger) As ProcessDiagnosticInfo

Parameters

processId
UInt32

unsigned int

uint32_t

The identifier of the process for which to retrieve a ProcessDiagnosticInfo object.

Returns

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

Remarks

If you call this method for the current app process ID, there is no capability check. Calling the method for any other process requires user consent, which defaults to denied. Users can provide consent in the Settings app. An app can request consent programmatically by calling AppDiagnosticInfo.RequestAccessAsync.

Applies to