ca3add0b8c978e9d30129ff42c0853fc068c3a82
[reactos.git] / reactos / w32api / 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 NTOSAPI
54 VOID
55 DDKAPI
56 ExReleaseResourceForThreadLite(
57 IN PERESOURCE Resource,
58 IN ERESOURCE_THREAD ResourceThreadId);
59
60 NTOSAPI
61 NTSTATUS
62 DDKFASTAPI
63 IoReadPartitionTable(
64 IN PDEVICE_OBJECT DeviceObject,
65 IN ULONG SectorSize,
66 IN BOOLEAN ReturnRecognizedPartitions,
67 OUT struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer);
68
69 NTOSAPI
70 NTSTATUS
71 DDKFASTAPI
72 IoSetPartitionInformation(
73 IN PDEVICE_OBJECT DeviceObject,
74 IN ULONG SectorSize,
75 IN ULONG PartitionNumber,
76 IN ULONG PartitionType);
77
78 NTOSAPI
79 NTSTATUS
80 DDKFASTAPI
81 IoWritePartitionTable(
82 IN PDEVICE_OBJECT DeviceObject,
83 IN ULONG SectorSize,
84 IN ULONG SectorsPerTrack,
85 IN ULONG NumberOfHeads,
86 IN struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer);
87
88 /*
89 * PVOID MmGetSystemAddressForMdl(
90 * IN PMDL Mdl);
91 */
92 #define MmGetSystemAddressForMdl(Mdl) \
93 (((Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \
94 MDL_SOURCE_IS_NONPAGED_POOL)) ? \
95 ((Mdl)->MappedSystemVa) : \
96 (MmMapLockedPages((Mdl), KernelMode)))
97
98 #pragma pack(pop)
99
100 #ifdef __cplusplus
101 }
102 #endif
103
104 #endif /* __WIN2K_H */