DIFXAPISetLogCallback 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.

The DIFXAPISetLogCallback function registers a caller-supplied callback function that DIFxAPI calls to log information about events that occur during DIFxAPI operations.

Syntax

VOID DIFXAPISetLogCallback(
  _In_opt_DIFXAPILOGCALLBACK_W LogCallback,
  _In_opt_PVOID CallbackContext
);

Parameters

LogCallback [in, optional]

A pointer to a DIFXAPILOGCALLBACK-typed function or NULL. If the pointer is supplied, DIFxAPI calls the callback function to log event messages. If the pointer is NULL, DIFxAPI unregisters the currently registered callback function, if any, and does not log event messages.

CallbackContext [in, optional]

A pointer to a callback context for the callback function. DIFxAPI returns this context as an input parameter to the callback function.

Return value

None

Remarks

You can use DIFXAPISetLogCallback or SetDifxLogCallback to register a callback that DIFxAPI calls to log events. The only difference between the two logging options is the calling convention that is used to call the callback function, as follows:

  • Call DIFXAPISetCallback to register a callback function that DIFxAPI calls by using the default calling convention for the C programming language. Include the keyword modifier __cdecl in the function declaration of the callback function to specify the default calling convention for C.

  • Call SetDifxLogCallback to register a callback function that DIFxAPI calls by using the calling convention for Win32 API functions. Include the WINAPI macro in the function declaration of the callback function to specify the calling convention that is used for Win32 API functions.

Requirements

Target platform Desktop
Version Available for Microsoft Windows 2000 and later versions of Windows.
Header Difxapi.h (include Difxapi.h)
Library Difxapi.lib

See also

DIFXAPILOGCALLBACK

SetDifxLogCallback