次の方法で共有


DIFLOGCALLBACK callback function

Starting in Windows 10 Version 1607 (Redstone 1), the Driver Install Frameworks (DIFx) tools are no longer included in the WDK.

For more information, see DIFx Guidelines.

A DIFLOGCALLBACK-typed function is an application-supplied callback function that an application registers by calling SetDifxLogCallback. DIFxAPI calls the callback function to log events that occur during DIFxAPI operation.

Syntax

DIFLOGCALLBACK DI_FX_Log_Callback;

void WINAPI DI_FX_Log_Callback(
  DIFXAPI_LOG Event,
  DWORD Error,
  PCTSTR EventDescription,
  PVOID CallbackContext
)
{ ... }

Parameters

Event

A DIFXAPI_LOG-typed enumerator that indicates the event type. The DIFXAPI_LOG enumeration is defined as follows:

typedef enum {
  DIFXAPI_SUCCESS,
  DIFXAPI_INFO,
  DIFXAPI_WARNING,
  DIFXAPI_ERROR
} DIFXAPI_LOG;

The enumeration values represent the event types that are listed in the following table.

Value Event type
DIFXAPI_SUCCESS A success event that logs a message that indicates that an operation succeeded.
DIFXAPI_INFO An information event that logs a message that describes the context or progress of an operation.
DIFXAPI_WARNING A warning event that logs a message about a possible problem that is not a fatal error.
DIFXAPI_ERROR An error event that logs a message about a fatal error.

Error

A DWORD-typed value that specifies a Microsoft Win32 error code that is associated with an event, if one exists; otherwise, Error is zero.

EventDescription

A pointer to a NULL-terminated string that describes the event.

CallbackContext

A pointer to the callback context that a caller set for the callback function.

Return value

None

Remarks

To register a DIFLOGCALLBACK-typed callback function, an application calls SetDifxLogCallback and supplies a pointer to an application-supplied callback function and a pointer to an optional application-specific callback context.

Requirements

Target platform Desktop
Header Difxapi.h (include Difxapi.h)

See also

SetDifxLogCallback