SetDifxLogCallback function

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. For more information about event logging, see Using DIFxAPI Event Logging.

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

Version

Available for Microsoft Windows 2000 and later versions of Windows.

Header

Difxapi.h (include Difxapi.h)

Library

Difxapi.lib

See also

DIFLOGCALLBACK
DIFXAPISetLogCallback

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft