Source code of Windows XP (NT5)
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.

130 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. wdm.c
  5. Abstract:
  6. This is the WDM DX mapper driver.
  7. Author:
  8. billpa
  9. Environment:
  10. Kernel mode only
  11. Revision History:
  12. --*/
  13. #include "wdm.h"
  14. #include "basedef.h"
  15. #include "vmm.h"
  16. #include "dxapi.h"
  17. #include "dxmapper.h"
  18. #ifdef ALLOC_PRAGMA
  19. #pragma alloc_text(PAGE, DriverEntry)
  20. #endif
  21. BOOLEAN DsoundOk = FALSE;
  22. NTSTATUS
  23. DriverEntry(
  24. IN PDRIVER_OBJECT DriverObject,
  25. IN PUNICODE_STRING RegistryPath
  26. )
  27. /*++
  28. Routine Description:
  29. Entry point for explicitely loaded stream class.
  30. Arguments:
  31. DriverObject - Pointer to the driver object created by the system.
  32. RegistryPath - unused.
  33. Return Value:
  34. STATUS_SUCCESS
  35. --*/
  36. {
  37. UNREFERENCED_PARAMETER(DriverObject);
  38. DEBUG_BREAKPOINT();
  39. return STATUS_SUCCESS;
  40. }
  41. ULONG
  42. DxApiGetVersion(
  43. )
  44. /*++
  45. Routine Description:
  46. Arguments:
  47. Return Value:
  48. --*/
  49. {
  50. return (DXCheckDSoundVersion());
  51. }
  52. ULONG
  53. DxApi(
  54. IN ULONG dwFunctionNum,
  55. IN PVOID lpvInBuffer,
  56. IN ULONG cbInBuffer,
  57. IN PVOID lpvOutBuffer,
  58. IN ULONG cbOutBuffer
  59. )
  60. /*++
  61. Routine Description:
  62. Arguments:
  63. Return Value:
  64. --*/
  65. {
  66. DEBUG_BREAKPOINT();
  67. //
  68. // if we haven't checked if DSOUND is present and the right version,
  69. // (or if we've checked before and failed) check and return error if not
  70. // loaded or correct version.
  71. //
  72. if (!DsoundOk) {
  73. DEBUG_BREAKPOINT();
  74. if (DXCheckDSoundVersion() < DXVERSION) {
  75. DEBUG_BREAKPOINT();
  76. return 0;
  77. } else {
  78. DsoundOk = TRUE;
  79. }
  80. }
  81. return DXIssueIoctl( dwFunctionNum, lpvInBuffer, cbInBuffer,
  82. lpvOutBuffer, cbOutBuffer );
  83. }