1 | /*
|
---|
2 | * Copyright 2008 Francois Gouget for CodeWeavers
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef _NTDDK_
|
---|
29 | #define _NTDDK_
|
---|
30 |
|
---|
31 | /* Note: We will probably have to duplicate everything ultimately :-( */
|
---|
32 | #include <ddk/wdm.h>
|
---|
33 |
|
---|
34 | #include <excpt.h>
|
---|
35 | /* FIXME: #include <ntdef.h> */
|
---|
36 | #include <ntstatus.h>
|
---|
37 | /* FIXME: #include <bugcodes.h> */
|
---|
38 | /* FIXME: #include <ntiologc.h> */
|
---|
39 |
|
---|
40 |
|
---|
41 | typedef enum _BUS_DATA_TYPE
|
---|
42 | {
|
---|
43 | ConfigurationSpaceUndefined = -1,
|
---|
44 | Cmos,
|
---|
45 | EisaConfiguration,
|
---|
46 | Pos,
|
---|
47 | CbusConfiguration,
|
---|
48 | PCIConfiguration,
|
---|
49 | VMEConfiguration,
|
---|
50 | NuBusConfiguration,
|
---|
51 | PCMCIAConfiguration,
|
---|
52 | MPIConfiguration,
|
---|
53 | MPSAConfiguration,
|
---|
54 | PNPISAConfiguration,
|
---|
55 | MaximumBusDataType
|
---|
56 | } BUS_DATA_TYPE, *PBUS_DATA_TYPE;
|
---|
57 |
|
---|
58 | typedef struct _CONFIGURATION_INFORMATION
|
---|
59 | {
|
---|
60 | ULONG DiskCount;
|
---|
61 | ULONG FloppyCount;
|
---|
62 | ULONG CdRomCount;
|
---|
63 | ULONG TapeCount;
|
---|
64 | ULONG ScsiPortCount;
|
---|
65 | ULONG SerialCount;
|
---|
66 | ULONG ParallelCount;
|
---|
67 | BOOLEAN AtDiskPrimaryAddressClaimed;
|
---|
68 | BOOLEAN AtDiskSecondaryAddressClaimed;
|
---|
69 | ULONG Version;
|
---|
70 | ULONG MediumChangerCount;
|
---|
71 | } CONFIGURATION_INFORMATION, *PCONFIGURATION_INFORMATION;
|
---|
72 |
|
---|
73 | typedef enum _CONFIGURATION_TYPE
|
---|
74 | {
|
---|
75 | ArcSystem = 0,
|
---|
76 | CentralProcessor,
|
---|
77 | FloatingPointProcessor,
|
---|
78 | PrimaryIcache,
|
---|
79 | PrimaryDcache,
|
---|
80 | SecondaryIcache,
|
---|
81 | SecondaryDcache,
|
---|
82 | SecondaryCache,
|
---|
83 | EisaAdapter,
|
---|
84 | TcAdapter,
|
---|
85 | ScsiAdapter,
|
---|
86 | DtiAdapter,
|
---|
87 | MultiFunctionAdapter,
|
---|
88 | DiskController,
|
---|
89 | TapeController,
|
---|
90 | CdromController,
|
---|
91 | WormController,
|
---|
92 | SerialController,
|
---|
93 | NetworkController,
|
---|
94 | DisplayController,
|
---|
95 | ParallelController,
|
---|
96 | PointerController,
|
---|
97 | KeyboardController,
|
---|
98 | AudioController,
|
---|
99 | OtherController,
|
---|
100 | DiskPeripheral,
|
---|
101 | FloppyDiskPeripheral,
|
---|
102 | TapePeripheral,
|
---|
103 | ModemPeripheral,
|
---|
104 | MonitorPeripheral,
|
---|
105 | PrinterPeripheral,
|
---|
106 | PointerPeripheral,
|
---|
107 | KeyboardPeripheral,
|
---|
108 | TerminalPeripheral,
|
---|
109 | OtherPeripheral,
|
---|
110 | LinePeripheral,
|
---|
111 | NetworkPeripheral,
|
---|
112 | SystemMemory,
|
---|
113 | DockingInformation,
|
---|
114 | RealModeIrqRoutingTable,
|
---|
115 | RealModePCIEnumeration,
|
---|
116 | MaximunType
|
---|
117 | } CONFIGURATION_TYPE, *PCONFIGURATION_TYPE;
|
---|
118 |
|
---|
119 | typedef struct _IMAGE_INFO
|
---|
120 | {
|
---|
121 | union
|
---|
122 | {
|
---|
123 | ULONG Properties;
|
---|
124 | struct
|
---|
125 | {
|
---|
126 | ULONG ImageAddressingMode : 8;
|
---|
127 | ULONG SystemModeImage : 1;
|
---|
128 | ULONG ImageMappedToAllPids : 1;
|
---|
129 | ULONG ExtendedInfoPresent : 1;
|
---|
130 | ULONG Reserved : 21;
|
---|
131 | };
|
---|
132 | };
|
---|
133 | PVOID ImageBase;
|
---|
134 | ULONG ImageSelector;
|
---|
135 | SIZE_T ImageSize;
|
---|
136 | ULONG ImageSectionNumber;
|
---|
137 | } IMAGE_INFO, *PIMAGE_INFO;
|
---|
138 |
|
---|
139 | typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION
|
---|
140 | {
|
---|
141 | LARGE_INTEGER ValidDataLength;
|
---|
142 | } FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
|
---|
143 |
|
---|
144 | typedef VOID (WINAPI *PDRIVER_REINITIALIZE)(PDRIVER_OBJECT,PVOID,ULONG);
|
---|
145 | typedef VOID (WINAPI *PLOAD_IMAGE_NOTIFY_ROUTINE)(PUNICODE_STRING,HANDLE,PIMAGE_INFO);
|
---|
146 | typedef NTSTATUS (WINAPI *PIO_QUERY_DEVICE_ROUTINE)(PVOID,PUNICODE_STRING,INTERFACE_TYPE,ULONG,
|
---|
147 | PKEY_VALUE_FULL_INFORMATION*,CONFIGURATION_TYPE,ULONG,PKEY_VALUE_FULL_INFORMATION*);
|
---|
148 |
|
---|
149 | NTSTATUS WINAPI IoQueryDeviceDescription(PINTERFACE_TYPE,PULONG,PCONFIGURATION_TYPE,PULONG,
|
---|
150 | PCONFIGURATION_TYPE,PULONG,PIO_QUERY_DEVICE_ROUTINE,PVOID);
|
---|
151 | void WINAPI IoRegisterDriverReinitialization(PDRIVER_OBJECT,PDRIVER_REINITIALIZE,PVOID);
|
---|
152 | NTSTATUS WINAPI IoRegisterShutdownNotification(PDEVICE_OBJECT);
|
---|
153 | NTSTATUS WINAPI PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE);
|
---|
154 |
|
---|
155 | #endif
|
---|