Share via


Logging::LogDiscreteOperation method

This method logs a discrete event to the AXE engine s pre-configured ETW session.

Syntax

virtual HRESULT LogDiscreteOperation(
  [in]           UINT    operationId,
  [in, optional] LPCWSTR message,
  [in]           UINT    blobSize,
  [in, optional] BYTE    *blob
) = 0;

Parameters

operationId [in]

A custom numerical identifier that identifies some operation expressed by the assessment.

message [in, optional]

A UNICODE string to log with the begin operation event. This string may be empty. This string must not be longer than 1024 characters.

blobSize [in]

The number of bytes pointed to by the blob parameter. The blobByteSize may be 0. The blob size must not be greater than 32K bytes.

blob [in, optional]

A custom byte stream to log to the ETW session. If the blobByteSize is 0, this parameter must be NULL.

Return value

If the function succeeds, the return is S_OK. If blob is not NULL when blobByteSize is zero, the return is E_INVALIDARG. If blob is NULL when blobByteSize is not zero, the return is E_POINTER.

Remarks

Calling this API logs the operationId, message and the blob to AXE s pre-configured ETW session as the session s ASSESSMENT_DISCRETE_OPERATION event. Assessments should end the session with a call to LogEndOperation.

It is strongly recommended that the Begin and End operation events be logged as pairs matched by Id. If they are not matched, ETW trace processing tools and data viewers will not be able to analyze paired events.

Managed code uses the Logging.LogDiscreteOperation method.

Requirements

Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]
Header
AxeCore.h
DLL
AxeCore.dll

See also

Logging