199c6c64fc71d0d2c7d27a678c411ea2ac5c47ea
[reactos.git] / include / ddk / nt_vdd.h
1 /*
2 * nt_vdd.h
3 *
4 * Windows NT Device Driver Kit
5 *
6 * This file is part of the ReactOS DDK package.
7 *
8 * Contributors:
9 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23 #pragma once
24
25 #define _NT_VDD
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 /*
32 * I/O Port services
33 */
34
35 typedef VOID (*PFNVDD_INB) (WORD iport, PBYTE data);
36 typedef VOID (*PFNVDD_INW) (WORD iport, PWORD data);
37 typedef VOID (*PFNVDD_INSB) (WORD iport, PBYTE data, WORD count);
38 typedef VOID (*PFNVDD_INSW) (WORD iport, PWORD data, WORD count);
39 typedef VOID (*PFNVDD_OUTB) (WORD iport, BYTE data);
40 typedef VOID (*PFNVDD_OUTW) (WORD iport, WORD data);
41 typedef VOID (*PFNVDD_OUTSB) (WORD iport, PBYTE data, WORD count);
42 typedef VOID (*PFNVDD_OUTSW) (WORD iport, PWORD data, WORD count);
43
44 typedef struct _VDD_IO_HANDLERS
45 {
46 PFNVDD_INB inb_handler;
47 PFNVDD_INW inw_handler;
48 PFNVDD_INSB insb_handler;
49 PFNVDD_INSW insw_handler;
50 PFNVDD_OUTB outb_handler;
51 PFNVDD_OUTW outw_handler;
52 PFNVDD_OUTSB outsb_handler;
53 PFNVDD_OUTSW outsw_handler;
54 } VDD_IO_HANDLERS, *PVDD_IO_HANDLERS;
55
56 typedef struct _VDD_IO_PORTRANGE
57 {
58 WORD First;
59 WORD Last;
60 } VDD_IO_PORTRANGE, *PVDD_IO_PORTRANGE;
61
62 BOOL
63 WINAPI
64 VDDInstallIOHook
65 (
66 HANDLE hVdd,
67 WORD cPortRange,
68 PVDD_IO_PORTRANGE pPortRange,
69 PVDD_IO_HANDLERS IOhandler
70 );
71
72 VOID
73 WINAPI
74 VDDDeInstallIOHook
75 (
76 HANDLE hVdd,
77 WORD cPortRange,
78 PVDD_IO_PORTRANGE pPortRange
79 );
80
81 #ifdef __cplusplus
82 }
83 #endif
84
85 /* EOF */