Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

DIFXAPILOGCALLBACK (difxapi)
 
.
Summary
Summary
TODO - a short description

C# Signature:

public delegate void DIFXAPILOGCALLBACK(DIFXAPI_LOG EventType, Int32 ErrorCode, [MarshalAs(UnmanagedType.LPTStr)] string EventDescription, IntPtr CallbackContext);

VB Signature:

Public Delegate Sub DIFXAPILOGCALLBACK(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 DIFxAPILogCallbackFunc(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;
     }
}

None.

VB:

Public Sub DIFxAPILogCallbackFunc(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

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions