Windows NT 4.0 source code leak
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.

144 lines
4.4 KiB

4 years ago
  1. /****************************************************************************
  2. *
  3. * mpu401.h
  4. *
  5. * Copyright (c) 1991-1994 Microsoft Corporation. All Rights Reserved.
  6. *
  7. ***************************************************************************/
  8. #include "soundcfg.h"
  9. #define DRIVER_VERSION 0x0100
  10. #define MAX_ERR_STRING 300 /* max length of string table errors */
  11. #define DLG_CONFIG 42 /* dialog box resource id */
  12. #define SOUND_DEF_INT 9 /* Default interrupt */
  13. #define SOUND_DEF_PORT 0x330 /* Default port */
  14. /****************************************************************************
  15. typedefs
  16. ***************************************************************************/
  17. typedef struct {
  18. DWORD Port; // Port
  19. DWORD Int; // Interrupt
  20. } MPU_CONFIG;
  21. /****************************************************************************
  22. strings - all non-localized strings can be found in initc.c
  23. ***************************************************************************/
  24. #ifndef NOSTR
  25. extern TCHAR STR_DRIVERNAME[];
  26. extern TCHAR STR_PRODUCTNAME[];
  27. #endif /* NOSTR */
  28. /* Error strings... */
  29. #define IDS_ERRTWODRIVERS 1
  30. #define IDS_ERRMCANOTSUPPORTED 2
  31. #define IDS_ERRBADPORT 4
  32. #define IDS_ERRBADVERSION 5
  33. #define IDS_ERRBADINT 6
  34. #define IDS_ERRINTINUSE 7
  35. #define IDS_ERRBADCONFIG 16
  36. #define IDS_WARNPROCARD 17
  37. #define IDS_WARNTHUNDER 18
  38. #define IDS_FAILREMOVE 19
  39. #define IDS_INSUFFICIENT_PRIVILEGE 20
  40. #define IDS_WARNPROSPEC 21
  41. // dialog strings
  42. #define IDS_200 32
  43. #define IDS_210 33
  44. #define IDS_220 34
  45. #define IDS_230 35
  46. #define IDS_240 36
  47. #define IDS_250 37
  48. #define IDS_260 38
  49. #define IDS_270 39
  50. #define IDS_300 40
  51. #define IDS_310 41
  52. #define IDS_320 42
  53. #define IDS_330 43
  54. #define IDS_340 44
  55. #define IDS_350 45
  56. #define IDS_360 46
  57. #define IDS_370 47
  58. /****************************************************************************
  59. globals
  60. ***************************************************************************/
  61. /* in initc.c */
  62. HANDLE ghModule; /* our module handle */
  63. REG_ACCESS RegAccess; /* Handles to registry and services */
  64. BOOL bInstall; /* Tell config we're on an install */
  65. /***************************************************************************
  66. prototypes
  67. ***************************************************************************/
  68. /* config.c */
  69. extern int Config(HWND hWnd, HANDLE hInstance);
  70. extern LRESULT ConfigRemove(HWND hDlg);
  71. extern int ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
  72. extern void ConfigErrorMsgBox(HWND hDlg, UINT StringId);
  73. /* drvproc.c */
  74. extern LRESULT DriverProc(DWORD dwDriverID, HDRVR hDriver, UINT uiMessage, LPARAM lParam1, LPARAM lParam2);
  75. /* initc.c */
  76. extern DWORD ConfigGetIRQ(void);
  77. extern DWORD ConfigGetPortBase(void);
  78. /****************************************************************************
  79. Configuration support
  80. ***************************************************************************/
  81. #define IDC_FIRSTINT 0x100
  82. #define IDC_2 0x100
  83. #define IDC_3 0x101
  84. #define IDC_5 0x102
  85. #define IDC_7 0x103
  86. #define IDC_10 0x104
  87. #define IDC_LASTINT 0x104
  88. #define IDC_PORTS 1002
  89. #define IDC_PORTGRP 0x401
  90. #define IDC_INTGRP 0x402
  91. /****************************************************************************
  92. Debug output
  93. ***************************************************************************/
  94. #ifdef DEBUG
  95. extern WORD wDebugLevel; /* debug level */
  96. #define D1(sz) if (wDebugLevel >= 1) (OutputDebugStr(STR_CRLF),OutputDebugStr(sz))
  97. #define D2(sz) if (wDebugLevel >= 2) (OutputDebugStr(STR_SPACE),OutputDebugStr(sz))
  98. #define D3(sz) if (wDebugLevel >= 3) (OutputDebugStr(STR_SPACE),OutputDebugStr(sz))
  99. #define D4(sz) if (wDebugLevel >= 4) (OutputDebugStr(STR_SPACE),OutputDebugStr(sz))
  100. #else
  101. #define D1(sz) 0
  102. #define D2(sz) 0
  103. #define D3(sz) 0
  104. #define D4(sz) 0
  105. #endif