Share via


SetDifxLogCallback 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 SetDifxLogCallback function registers a caller-supplied callback function that DIFxAPI calls to log information about events that occur during DIFxAPI operations.

Syntax

VOID SetDifxLogCallback(
  _In_DIFXLOGCALLBACK LogCallback,
  _In_PVOID CallbackContext
);

Parameters

LogCallback [in]

A pointer to a DIFLOGCALLBACK-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]

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

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

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

DIFLOGCALLBACK

DIFXAPISetLogCallback