次の方法で共有


DIFXAPILOGCALLBACK 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 DIFXAPILOGCALLBACK-typed function is an application-supplied callback function that an application registers with DIFxAPI by calling DIFXAPISetLogCallback. DIFxAPI calls the callback function to log events that occur during DIFxAPI operation.

Syntax

DIFXAPILOGCALLBACK DI_FX_API_Log_Callback;

void __cdecl DI_FX_API_Log_Callback(
  DIFXAPI_LOG EventType,
  DWORD Error,
  PCTSTR EventDescription,
  PVOID CallbackContext
)
{ ... }

Parameters

EventType

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 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 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 DIFxAPI log callback function, an application calls DIFXAPISetLogCallback and supplies a pointer to an application-supplied DIFXAPILOGCALLBACK-typed function and a pointer to an optional application-specific callback context.

Requirements

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

See also

DIFXAPISetLogCallback