// wdfrequest.h
VOID WdfRequestSetActivityId(
[in] WDFREQUEST Request,
[in] LPGUID ActivityId
);
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to UMDF only]
The WdfRequestSetActivityId method associates an activity identifier with an I/O request.
Request [in]A handle to a framework request object.
ActivityId [in]A pointer to the activity identifier GUID to store in the I/O request.
Calling WdfRequestSetActivityId does not set an association with any previously present activity identifier. When the driver calls WdfRequestSetActivityId, any existing activity identifier is overwritten.
To set an association, retrieve the existing identifier by calling WdfRequestRetrieveActivityId and then associate the existing identifier with the new one by calling EventWriteTransfer.
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.