// wdfrequest.h
NTSTATUS WdfRequestRetrieveActivityId(
[in] WDFREQUEST Request,
[out] LPGUID ActivityId
);
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to UMDF only]
The WdfRequestRetrieveActivityId method retrieves the current activity identifier associated with an I/O request.
Request [in]A handle to a framework request object.
ActivityId [out]A pointer to a location to store the retrieved GUID.
If the operation succeeds, WdfRequestRetrieveActivityId returns STATUS_SUCCESS. Additional return values include:
| Return code | Description |
|---|---|
| STATUS_NOT_FOUND | No activity ID is associated with the request. |
The method might return other NTSTATUS values.
Requests reflected from kernel mode have an activity identifier available only if the Kernel Trace provider is enabled or if the UMDF driver called WdfRequestSetActivityId after receiving the request. For more information about Event Tracing for Windows (ETW), see Event Tracing.
Requests initiated by the UMDF driver have an activity identifier available only if the UMDF driver previously called WdfRequestSetActivityId.
The framework does not clear a request's activity identifier when the driver calls WdfRequestReuse.
For more information about activity identifiers, see Using Activity Identifiers.