@msdn=http://msdn2.microsoft.com/en-us/library/aa906356.aspx @pinvoke=http://pinvoke.net/$$$.htm Summary: A DIFLOGCALLBACK-typed function is an application-supplied callback function that an application registers with DIFxAPI by calling SetDifxLogCallback. DIFxAPI calls the callback function to log events that occur during DIFxAPI operation. !!!!C# Signature: public delegate void DIFLOGCALLBACK(DIFXAPI_LOG EventType, Int32 ErrorCode, [MarshalAs(UnmanagedType.LPTStr)] string EventDescription, IntPtr CallbackContext); !!!!VB Signature: Public Delegate Sub DIFLOGCALLBACK(ByVal EventType As DIFXAPI_LOG, ByVal ErrorCode As Int32, <MarshalAs(UnmanagedType.LPTStr)> ByVal EventDescription As String, ByVal CallbackContext As IntPtr) !!!!User-Defined Types: [DIFXAPI_LOG] !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: None. !!!!Tips & Tricks: To use this function you just need difxapi.dll of appropriate architecture from Windows Server 2008/Vista WDK. The DriverStore will be created automatically for you. !!!!Sample Code: C#: public static void DIFLogCallbackFunc(DIFXAPI_LOG EventType, Int32 ErrorCode, string EventDescription, IntPtr CallbackContext) { switch (EventType) { case DIFXAPI_LOG.DIFXAPI_SUCCESS: Console.WriteLine("SUCCESS: {0}. Error code: {1}", EventDescription, ErrorCode); break; case DIFXAPI_LOG.DIFXAPI_INFO: Console.WriteLine("INFO: {0}. Error code: {1}", EventDescription, ErrorCode); break; case DIFXAPI_LOG.DIFXAPI_WARNING: Console.WriteLine("WARNING: {0}. Error code: {1}", EventDescription, ErrorCode); break; case DIFXAPI_LOG.DIFXAPI_ERROR: Console.WriteLine("ERROR: {0}. Error code: {1}", EventDescription, ErrorCode); break; } } VB: Public Sub DIFLogCallbackFunc(ByVal EventType As DIFXAPI_LOG, ByVal ErrorCode As Int32, ByVal EventDescription As String, ByVal CallbackContext As IntPtr) Select Case EventType Case DIFXAPI_LOG.DIFXAPI_SUCCESS Console.WriteLine("SUCCESS: {0}. Error code: {1}", EventDescription, ErrorCode) Exit Sub Case DIFXAPI_LOG.DIFXAPI_INFO Console.WriteLine("INFO: {0}. Error code: {1}", EventDescription, ErrorCode) Exit Sub Case DIFXAPI_LOG.DIFXAPI_WARNING Console.WriteLine("WARNING: {0}. Error code: {1}", EventDescription, ErrorCode) Exit Sub Case DIFXAPI_LOG.DIFXAPI_ERROR Console.WriteLine("ERROR: {0}. Error code: {1}", EventDescription, ErrorCode) Exit Sub End Select End Sub Documentation: DIFLOGCALLBACK@msdn on MSDN
Edit difxapi.DIFLOGCAL...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.