A couple of header fixes to get all the FreeLDR-loaded boot drivers to compile and...
[reactos.git] / reactos / include / ddk / win2k.h
1 /*
2 * win2k.h
3 *
4 * Definitions only used in Windows 2000 and earlier versions
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
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 #ifndef __WIN2K_H
24 #define __WIN2K_H
25
26 #if __GNUC__ >=3
27 #pragma GCC system_header
28 #endif
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #pragma pack(push,4)
35
36 typedef enum _BUS_DATA_TYPE {
37 ConfigurationSpaceUndefined = -1,
38 Cmos,
39 EisaConfiguration,
40 Pos,
41 CbusConfiguration,
42 PCIConfiguration,
43 VMEConfiguration,
44 NuBusConfiguration,
45 PCMCIAConfiguration,
46 MPIConfiguration,
47 MPSAConfiguration,
48 PNPISAConfiguration,
49 SgiInternalConfiguration,
50 MaximumBusDataType
51 } BUS_DATA_TYPE, *PBUS_DATA_TYPE;
52
53 #pragma pack(pop)
54
55 NTKERNELAPI
56 VOID
57 DDKAPI
58 ExReleaseResourceForThreadLite(
59 IN PERESOURCE Resource,
60 IN ERESOURCE_THREAD ResourceThreadId);
61
62 NTKERNELAPI
63 NTSTATUS
64 FASTCALL
65 IoReadPartitionTable(
66 IN PDEVICE_OBJECT DeviceObject,
67 IN ULONG SectorSize,
68 IN BOOLEAN ReturnRecognizedPartitions,
69 OUT struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer);
70
71 NTKERNELAPI
72 NTSTATUS
73 FASTCALL
74 IoSetPartitionInformation(
75 IN PDEVICE_OBJECT DeviceObject,
76 IN ULONG SectorSize,
77 IN ULONG PartitionNumber,
78 IN ULONG PartitionType);
79
80 NTKERNELAPI
81 NTSTATUS
82 FASTCALL
83 IoWritePartitionTable(
84 IN PDEVICE_OBJECT DeviceObject,
85 IN ULONG SectorSize,
86 IN ULONG SectorsPerTrack,
87 IN ULONG NumberOfHeads,
88 IN struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer);
89
90 /*
91 * PVOID MmGetSystemAddressForMdl(
92 * IN PMDL Mdl);
93 */
94 #define MmGetSystemAddressForMdl(Mdl) \
95 (((Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \
96 MDL_SOURCE_IS_NONPAGED_POOL)) ? \
97 ((Mdl)->MappedSystemVa) : \
98 (MmMapLockedPages((Mdl), KernelMode)))
99
100 #ifdef __cplusplus
101 }
102 #endif
103
104 #endif /* __WIN2K_H */