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.

131 lines
3.7 KiB

4 years ago
  1. /*
  2. mcihand.h
  3. This file defines the constants, structures and APIs used
  4. to implement the MCI handler interface.
  5. 6/17/91 NigelT
  6. */
  7. #ifndef MCIHAND_H
  8. #define MCIHAND_H
  9. //
  10. // Define the name of a handler entry point
  11. //
  12. #define MCI_HANDLER_PROC_NAME "DriverProc"
  13. //
  14. // Typedef the entry routine for a driver
  15. //
  16. typedef LONG (HANDLERPROC)(DWORD dwId, UINT msg, LONG lp1, LONG lp2);
  17. typedef HANDLERPROC *LPHANDLERPROC;
  18. //
  19. // Define the messages sent to a handler which are generic to the
  20. // handler rather than a specific device handled by it.
  21. //
  22. #define MCI_OPEN_HANDLER 0x0001
  23. #define MCI_CLOSE_HANDLER 0x0002
  24. #define MCI_QUERY_CONFIGURE 0x0003
  25. #define MCI_CONFIGURE 0x0004
  26. //
  27. // Define the device specific messages sent to the handlers
  28. //
  29. #define MCI_OPEN_DEVICE 0x0800
  30. #define MCI_CLOSE_DEVICE 0x0801
  31. /*
  32. // #ifndef MAKEMCIRESOURCE
  33. // #define MAKEMCIRESOURCE(wRet, wRes) MAKELONG((wRet), (wRes))
  34. // #endif
  35. */
  36. //
  37. // Define the return code for happy campers
  38. // This is returned in response to driver messages which succeed
  39. //
  40. #define MCI_SUCCESS 0x00000000
  41. //
  42. // String return values only used with MAKEMCIRESOURCE
  43. //
  44. #define MCI_FORMAT_RETURN_BASE MCI_FORMAT_MILLISECONDS_S
  45. #define MCI_FORMAT_MILLISECONDS_S (MCI_STRING_OFFSET + 21)
  46. #define MCI_FORMAT_HMS_S (MCI_STRING_OFFSET + 22)
  47. #define MCI_FORMAT_MSF_S (MCI_STRING_OFFSET + 23)
  48. #define MCI_FORMAT_FRAMES_S (MCI_STRING_OFFSET + 24)
  49. #define MCI_FORMAT_SMPTE_24_S (MCI_STRING_OFFSET + 25)
  50. #define MCI_FORMAT_SMPTE_25_S (MCI_STRING_OFFSET + 26)
  51. #define MCI_FORMAT_SMPTE_30_S (MCI_STRING_OFFSET + 27)
  52. #define MCI_FORMAT_SMPTE_30DROP_S (MCI_STRING_OFFSET + 28)
  53. #define MCI_FORMAT_BYTES_S (MCI_STRING_OFFSET + 29)
  54. #define MCI_FORMAT_SAMPLES_S (MCI_STRING_OFFSET + 30)
  55. #define MCI_FORMAT_TMSF_S (MCI_STRING_OFFSET + 31)
  56. #define WAVE_FORMAT_PCM_S (MCI_WAVE_OFFSET + 0)
  57. #define WAVE_MAPPER_S (MCI_WAVE_OFFSET + 1)
  58. #define MIDIMAPPER_S (MCI_SEQ_OFFSET + 11)
  59. //
  60. // Parameters for internal version of MCI_OPEN message sent from
  61. // mciOpenDevice to the handler. The wCustomCommandTable field is
  62. // set by the driver. It is set to MCI_TABLE_NOT_PRESENT if there
  63. // is no table. The wType field is also set by the driver.
  64. //
  65. typedef struct {
  66. LPSTR lpstrParams; // parameter string for entry in ini file
  67. DWORD wDeviceID; // device ID
  68. UINT wCustomCommandTable; // custom command table
  69. UINT wType; // driver type
  70. } MCI_OPEN_HANDLER_PARMS;
  71. typedef MCI_OPEN_HANDLER_PARMS FAR * LPMCI_OPEN_HANDLER_PARMS;
  72. //
  73. // The maximum length of an MCI device type
  74. //
  75. #define MCI_MAX_DEVICE_TYPE_LENGTH 80
  76. //
  77. // Flags for mciSendCommandInternal which direct mciSendString how to
  78. // interpret the return value
  79. //
  80. #define MCI_RESOURCE_RETURNED 0x00010000 // resource ID
  81. #define MCI_COLONIZED3_RETURN 0x00020000 // colonized ID, 3 bytes data
  82. #define MCI_COLONIZED4_RETURN 0x00040000 // colonized ID, 4 bytes data
  83. #define MCI_INTEGER_RETURNED 0x00080000 // Integer conversion needed
  84. #define MCI_RESOURCE_DRIVER 0x00100000 // driver owns returned resource
  85. //
  86. // Command table information type tags
  87. //
  88. #define MCI_TABLE_NOT_PRESENT (-1)
  89. #define MCI_CUSTOM_TABLE 0
  90. #define MCI_COMMAND_HEAD 0
  91. #define MCI_STRING 1
  92. #define MCI_INTEGER 2
  93. #define MCI_END_COMMAND 3
  94. #define MCI_RETURN 4
  95. #define MCI_FLAG 5
  96. #define MCI_END_COMMAND_LIST 6
  97. #define MCI_RECT 7
  98. #define MCI_CONSTANT 8
  99. #define MCI_END_CONSTANT 9
  100. #endif /* MCIHAND_H */