4 ;; ------------------------------------------------
5 ;; ------------------------------------------------
6 ;; HK95d.asm -- Assembly module, MAIN module for
7 ;; Dynamically loadable VxD for DCHOOK
8 ;; ------------------------------------------------
9 ;; ------------------------------------------------
11 ;; -----------------------------------
12 ;; INCLUDE files needed by this module
13 ;; -----------------------------------
15 include <inc\win98\vmm.inc>
16 include <inc\win98\vwin32.inc>
17 include <inc\win98\vpicd.inc>
19 ;; ------------------------------------
20 ;; C routines/data used by this module
21 ;; ------------------------------------
22 extrn _CHK95_Device_Init:near
23 extrn _CHK95_Device_UNInit:near
24 extrn _CHK95_Device_IOctrl:near
26 ;; -------------------------------------
27 ;; Routines/data called from this module
28 ;; -------------------------------------
31 ; ==================================================================================
32 ;; Misc HK95-specific Equates
33 ;; ----------------------------------------------------------------------------------
34 HK95_MajoREV equ 1 ;MAJOR revision level
35 HK95_MinoREV equ 0 ;decimal number of revision
36 HK95_DeviceID equ Undefined_Device_ID ;no need for MS device number assignment
37 ; ==================================================================================
39 ;; ---------------------------------------------
40 ;; Virtual Device Declaration (Required)
41 ;; (Declares this code as virtual device driver)
42 ;; Also creates the Device Data Block
43 ;; ---------------------------------------------
45 Declare_Virtual_Device HK95D,HK95_MajoREV,HK95_MinoREV,HK95_Control,HK95_DeviceID,Undefined_Init_Order
48 ;; --------------------------------------------
49 ;; Control Dispatch Table & Proc (Required)
50 ;; Used to dispatch supported messages sent by
51 ;; VMM -- clears carry for unsupported mssgs.
52 ;; --------------------------------------------
53 ;; Only 3 VMM messages are recognized and processed
54 ;; by this routine -- all DIOC interface messages
55 ;; translate to W32_DeviceIoControl mssgs from the VMM.
56 ;; "Control_Dispatch" precedes MSSG NUMBER, PROCEDURE
58 BeginProc HK95_Control
59 Control_Dispatch Sys_Dynamic_Device_Exit, HK95_Device_UNInit
60 Control_Dispatch Sys_Dynamic_Device_Init, HK95_Device_Init
61 Control_Dispatch W32_DeviceIoControl, HK95_Device_IOctrl
62 xor eax,eax ;;return 0 (required in some instances)
63 clc ;;clear carry flg for GOOD indicator
67 ;; -------------------------------------------------------------
68 ;; NOTE: "BeginProc & EndProc" are needed in conjunction with
69 ;; the above dispatch table -- below routines facilitate C fcns
70 ;; -------------------------------------------------------------
72 ;; =======================================================================
73 ;; Routines below are VXD interface (load, unload, process) ROUTINES
74 ;; =======================================================================
76 ;; --------------------------------------------
77 ;; Routine to jump to C routine for processing
78 ;; SYS_DYNAMIC_DEVICE_INIT message
79 ;; --------------------------------------------
80 BeginProc HK95_Device_Init
81 call _CHK95_Device_Init
83 EndProc HK95_Device_Init
85 ;; --------------------------------------------
86 ;; Routine to jump to C routine for processing
87 ;; SYS_DYNAMIC_DEVICE_EXIT message
88 ;; --------------------------------------------
90 BeginProc HK95_Device_UNInit
91 call _CHK95_Device_UNInit
93 EndProc HK95_Device_UNInit
95 ;; --------------------------------------------
96 ;; Routine to jump to C routine for processing
97 ;; W32_DEVICEIOCONTROL messages -- These are
98 ;; VxD requests from the application.
99 ;; At entry, esi points to the DIOC interface
100 ;; structure passed by the application
101 ;; --------------------------------------------
103 BeginProc HK95_Device_IOctrl
105 call _CHK95_Device_IOctrl
108 EndProc HK95_Device_IOctrl
110 ;; ======================================================
111 ;; Routines below are miscellaneous assembly interfaces
112 ;; ======================================================