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.

138 lines
3.6 KiB

  1. /*++ BUILD Version: 0001
  2. Copyright (c) 1990-1999 Microsoft Corporation
  3. Module Name:
  4. ISVBOP.H
  5. Abstract:
  6. This is the header file supporting third party bops.
  7. isvbop.inc is the inc file for this h file.
  8. Note:
  9. Following include file uses 'DB' to define assembly macros. Some
  10. assemblers use 'emit' instead. If you are using such a compiler,
  11. you will have to change db's to emit's.
  12. --*/
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif
  16. #define BOP_3RDPARTY 0x58
  17. #define BOP_UNSIMULATE 0xFE
  18. /* XLATOFF */
  19. /** RegisterModule - This Bop call is made from the 16 bit module
  20. * to register a third party DLL with the bop
  21. * manager. This call returns a handle to the
  22. * 16bit caller which is to be used later to
  23. * dispatch a call to the DLL.
  24. *
  25. * INPUT:
  26. * Client DS:SI - asciiz string of DLL name.
  27. * Client ES:DI - asciiz string of Init Routine in the DLL. (Optional)
  28. * Client DS:BX - asciiz string to Dispatch routine in the DLL.
  29. *
  30. * OUTPUT:
  31. * SUCCESS:
  32. * Client Carry Clear
  33. * Client AX = Handle (non Zero)
  34. * FAILURE:
  35. * Client Carry Set
  36. * Client AX = Error Code
  37. * AX = 1 - DLL not found
  38. * AX = 2 - Dispacth routine not found.
  39. * AX = 3 - Init Routine Not Found
  40. * AX = 4 - Insufficient Memory
  41. *
  42. * NOTES:
  43. * RegisterModule results in loading the DLL (specified in DS:SI).
  44. * Its Init routine (specified in ES:DI) is called. Its Dispatch
  45. * routine (specified in DS:BX) is stored away and all the calls
  46. * made from DispatchCall are dispacthed to this routine.
  47. * If ES and DI both are null than the caller did'nt supply the init
  48. * routine.
  49. */
  50. #define RegisterModule() _asm _emit 0xC4 _asm _emit 0xC4 _asm _emit BOP_3RDPARTY _asm _emit 0x0
  51. /** UnRegisterModule - This Bop call is made from the 16 bit module
  52. * to unregister a third party DLL with the bop
  53. * manager.
  54. *
  55. * INPUT:
  56. * Client AX - Handle returned by RegisterModule Call.
  57. *
  58. * OUTPUT:
  59. * None (VDM Is terminated with a debug message if Handle is invalid)
  60. *
  61. * NOTES:
  62. * Use it if initialization of 16bit app fails after registering the
  63. * Bop.
  64. */
  65. #define UnRegisterModule() _asm _emit 0xC4 _asm _emit 0xC4 _asm _emit BOP_3RDPARTY _asm _emit 0x1
  66. /** DispacthCall - This Bop call is made from the 16 bit module
  67. * to pass a request to its DLL.
  68. *
  69. * INPUT:
  70. * Client AX - Handle returned by RegisterModule Call.
  71. *
  72. * OUTPUT:
  73. * None (DLL should set the proper output registers etc.)
  74. * (VDM Is terminated with a debug message if Handle is invalid)
  75. *
  76. * NOTES:
  77. * Use it to pass a request to 32bit DLL. The request index and the
  78. * parameters are passed in different registers. These register settings
  79. * are private to the 16bit module and its associated VDD. Bop manager
  80. * does'nt know anything about these registers.
  81. */
  82. #define DispatchCall() _asm _emit 0xC4 _asm _emit 0xC4 _asm _emit BOP_3RDPARTY _asm _emit 0x2
  83. /*** VDDUnSimulate16
  84. *
  85. * This service causes the simulation of intel instructions to stop and
  86. * control to return to VDD.
  87. *
  88. * INPUT
  89. * None
  90. *
  91. * OUTPUT
  92. * None
  93. *
  94. * NOTES
  95. * This service is a macro intended for 16bit stub-drivers. At the
  96. * end of worker routine stub-driver should use it.
  97. */
  98. #define VDDUnSimulate16() _asm _emit 0xC4 _asm _emit 0xC4 _asm _emit BOP_UNSIMULATE
  99. /* XLATON */
  100. /* ASM
  101. RegisterModule macro
  102. db 0C4h, 0C4h, BOP_3RDPARTY, 0
  103. endm
  104. UnRegisterModule macro
  105. db 0C4h, 0C4h, BOP_3RDPARTY, 1
  106. endm
  107. DispatchCall macro
  108. db 0C4h, 0C4h, BOP_3RDPARTY, 2
  109. endm
  110. VDDUnSimulate16 macro
  111. db 0C4h, 0C4h, BOP_UNSIMULATE
  112. endm
  113. */