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.

84 lines
3.4 KiB

  1. // Copyright (c) 1993-1997 Microsoft Corporation
  2. /* --------------------------------------------------------------------
  3. ** Module : wowmmcb.h
  4. **
  5. ** Description : Interrupt callback stuff for Multi-Media.
  6. **
  7. ** History: : Created 09-Nov-1992 by StephenE
  8. **
  9. ** --------------------------------------------------------------------
  10. */
  11. #ifndef WOWMMCB_H
  12. #define WOWMMCB_H
  13. /*
  14. ** This header file will go through both 16 bit and 32 bit compilers.
  15. ** In 16 bit land UNALIGNED is not required, on 32 bit land UNALIGNED
  16. ** would have been #defined by the time this file was #included because
  17. ** this file is always included after wow32.h. This means the following
  18. ** #define is always a no-op with 16 bit compilers and ignored with
  19. ** 32 bit compilers.
  20. */
  21. #ifndef UNALIGNED
  22. #define UNALIGNED
  23. #endif
  24. /* --------------------------------------------------------------------
  25. ** Hardware Interrupts:
  26. **
  27. ** IRQ: Interrupt: ICA: Line: Description:
  28. ** -------------------------------------------------------------------
  29. ** IRQ0 0x08 0 0 Timer Tick every 18.2 times per second.
  30. ** IRQ1 0x09 0 1 Keyboard service required.
  31. ** IRQ2 0x0A 0 2 INT from slave 8259A.
  32. ** IRQ8 0x70 1 0 Real time clock service.
  33. ** IRQ9 0x71 1 1 Software redirected to IRQ2.
  34. ** IRQ10 0x72 1 2 Reserved.
  35. ** IRQ11 0x73 1 3 Reserved.
  36. ** IRQ12 0x74 1 4 Reserved.
  37. ** IRQ13 0x75 1 5 Numeric co-processor
  38. ** IRQ14 0x76 1 6 Fixed disk controller
  39. ** IRQ15 0x77 1 7 Reserved.
  40. ** IRQ3 0x0B 0 3 Com2 service request.
  41. ** IRQ4 0x0C 0 4 Com1 service request.
  42. ** IRQ5 0x0D 0 5 Data request from LPT2:
  43. ** IRQ6 0x0E 0 6 Floppy disk service required.
  44. ** IRQ7 0x0F 0 7 Data request from LPT1:
  45. **
  46. ** --------------------------------------------------------------------
  47. */
  48. #define MULTIMEDIA_LINE 2
  49. #define MULTIMEDIA_LINE_98 4
  50. #define MULTIMEDIA_ICA 1
  51. #define MULTIMEDIA_INTERRUPT 0x72
  52. #define MULTIMEDIA_INTERRUPT_98 0x14
  53. #define CALLBACK_ARGS_SIZE 16
  54. typedef struct _CALLBACK_ARGS { /* cbargs */
  55. DWORD dwFlags; // Flags to identify the type of callback.
  56. DWORD dwFunctionAddr; // 16:16 address of the function to be called
  57. WORD wHandle; // The handle or ID of the device
  58. WORD wMessage; // The message to be passed to function
  59. DWORD dwInstance; // User data
  60. DWORD dwParam1; // Device data 1
  61. DWORD dwParam2; // Device data 2
  62. } CALLBACK_ARGS;
  63. typedef struct _CALLBACK_DATA { /* cbdata */
  64. WORD wRecvCount; // The number of interrupts received
  65. WORD wSendCount; // The number of interrupts sent
  66. CALLBACK_ARGS args[CALLBACK_ARGS_SIZE]; // Interrupt arguments
  67. WORD wIntsCount; // The number of interrupts received
  68. } CALLBACK_DATA;
  69. typedef CALLBACK_DATA FAR *VPCALLBACK_DATA; // 16:16 pointer type
  70. typedef CALLBACK_ARGS FAR *VPCALLBACK_ARGS; // 16:16 pointer type
  71. typedef CALLBACK_DATA UNALIGNED *PCALLBACK_DATA; // 0:32 pointer type
  72. typedef CALLBACK_ARGS UNALIGNED *PCALLBACK_ARGS; // 0:32 pointer type
  73. VOID FAR PASCAL Notify_Callback_Data( VPCALLBACK_DATA vpCallbackData );
  74. #endif