Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EventActivityIdControl function

Creates, queries, and sets the current activity identifier used by the EventWriteTransfer function.

Syntax


ULONG EventActivityIdControl(
  _In_    ULONG  ControlCode,
  _Inout_ LPGUID ActivityId
);

Parameters

ControlCode [in]

A control code that specifies if you want to create, query or set the current activity identifier. You can specify one of the following codes.

ValueMeaning
EVENT_ACTIVITY_CTRL_GET_ID

Sets the ActivityId parameter to the current identifier value from thread local storage.

EVENT_ACTIVITY_CTRL_SET_ID

Uses the identifier in the ActivityId parameter to set the value of the current identifier in the thread local storage.

EVENT_ACTIVITY_CTRL_CREATE_ID

Creates a new identifier and sets the ActivityId parameter to the value of the new identifier.

EVENT_ACTIVITY_CTRL_GET_SET_ID

Performs the following:

  • Copies the current identifier from thread local storage.
  • Sets the current identifier in thread local storage to the new identifier specified in the ActivityId parameter.
  • Sets the ActivityId parameter to the copy of the previous current identifier.
EVENT_ACTIVITY_CTRL_CREATE_SET_ID

Performs the following:

  • Copies the current identifier from thread local storage.
  • Creates a new identifier and sets the current identifier in thread local storage to the new identifier.
  • Sets the ActivityId parameter to the copy of the previous current identifier.

 

ActivityId [in, out]

A GUID that uniquely identifies the activity. To determine when this parameter is an input parameter, an output parameter or both, see the descriptions for the ControlCodes parameter.

Return value

Returns ERROR_SUCCESS if successful.

Remarks

The EVENT_ACTIVITY_CTRL_GET_ID control code returns a GUID with all zeros (GUID_NULL) if the identifier has not been set.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Evntprov.h

Library

Advapi32.lib

DLL

Advapi32.dll

See also

EventWriteTransfer

 

 

Show: