This topic has not yet been rated - Rate this topic

EventActivityIdControl function

Applies to: desktop apps only

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]

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 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 identifier specified in the ActivityId parameter.
  • Sets the ActivityId parameter to the copy of the previous current identifier.

 

ActivityId [in, out]

GUID that uniquely identifies the activity. To know 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

Minimum supported server

Windows Server 2008

Header

Evntprov.h

Library

Advapi32.lib

DLL

Advapi32.dll

See also

EventWriteTransfer

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ