DIFXAPISetLogCallback function

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

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

Version

Available for Microsoft Windows 2000 and later versions of Windows.

Header

Difxapi.h (include Difxapi.h)

Library

Difxapi.lib

See also

DIFXAPILOGCALLBACK
SetDifxLogCallback

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft