Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.2 KiB

  1. #include <windows.h>
  2. #include <winddi.h>
  3. #define STANDARD_DEBUG_PREFIX "DXGTHK.SYS:"
  4. ULONG
  5. DriverEntry(
  6. PVOID DriverObject,
  7. PVOID RegistryPath
  8. );
  9. VOID
  10. DebugPrint(
  11. PCHAR DebugMessage,
  12. ...
  13. );
  14. #if defined(ALLOC_PRAGMA)
  15. #pragma alloc_text(PAGE,DriverEntry)
  16. #pragma alloc_text(PAGE,DebugPrint)
  17. #endif
  18. /***************************************************************************\
  19. * VOID DebugPrint
  20. *
  21. \***************************************************************************/
  22. VOID
  23. DebugPrint(
  24. PCHAR DebugMessage,
  25. ...
  26. )
  27. {
  28. va_list ap;
  29. va_start(ap, DebugMessage);
  30. EngDebugPrint(STANDARD_DEBUG_PREFIX, DebugMessage, ap);
  31. EngDebugPrint("", "\n", ap);
  32. va_end(ap);
  33. } // DebugPrint()
  34. /***************************************************************************\
  35. * NTSTATUS DriverEntry
  36. *
  37. * This routine is never actually called, but we need it to link.
  38. *
  39. \***************************************************************************/
  40. ULONG
  41. DriverEntry(
  42. PVOID DriverObject,
  43. PVOID RegistryPath
  44. )
  45. {
  46. DebugPrint("DriverEntry should not be called");
  47. return(0);
  48. }