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 | #include "ntddk.h"
|
---|
35 |
|
---|
36 | #pragma pack(push,4)
|
---|
37 |
|
---|
38 | typedef enum _BUS_DATA_TYPE {
|
---|
39 | ConfigurationSpaceUndefined = -1,
|
---|
40 | Cmos,
|
---|
41 | EisaConfiguration,
|
---|
42 | Pos,
|
---|
43 | CbusConfiguration,
|
---|
44 | PCIConfiguration,
|
---|
45 | VMEConfiguration,
|
---|
46 | NuBusConfiguration,
|
---|
47 | PCMCIAConfiguration,
|
---|
48 | MPIConfiguration,
|
---|
49 | MPSAConfiguration,
|
---|
50 | PNPISAConfiguration,
|
---|
51 | SgiInternalConfiguration,
|
---|
52 | MaximumBusDataType
|
---|
53 | } BUS_DATA_TYPE, *PBUS_DATA_TYPE;
|
---|
54 |
|
---|
55 | NTOSAPI
|
---|
56 | VOID
|
---|
57 | DDKAPI
|
---|
58 | ExReleaseResourceForThreadLite(
|
---|
59 | /*IN*/ PERESOURCE Resource,
|
---|
60 | /*IN*/ ERESOURCE_THREAD ResourceThreadId);
|
---|
61 |
|
---|
62 | NTOSAPI
|
---|
63 | NTSTATUS
|
---|
64 | DDKAPI
|
---|
65 | IoReadPartitionTable(
|
---|
66 | /*IN*/ PDEVICE_OBJECT DeviceObject,
|
---|
67 | /*IN*/ ULONG SectorSize,
|
---|
68 | /*IN*/ BOOLEAN ReturnRecognizedPartitions,
|
---|
69 | /*OUT*/ struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer);
|
---|
70 |
|
---|
71 | NTOSAPI
|
---|
72 | NTSTATUS
|
---|
73 | DDKAPI
|
---|
74 | IoSetPartitionInformation(
|
---|
75 | /*IN*/ PDEVICE_OBJECT DeviceObject,
|
---|
76 | /*IN*/ ULONG SectorSize,
|
---|
77 | /*IN*/ ULONG PartitionNumber,
|
---|
78 | /*IN*/ ULONG PartitionType);
|
---|
79 |
|
---|
80 | NTOSAPI
|
---|
81 | NTSTATUS
|
---|
82 | DDKAPI
|
---|
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 | #pragma pack(pop)
|
---|
101 |
|
---|
102 | #ifdef __cplusplus
|
---|
103 | }
|
---|
104 | #endif
|
---|
105 |
|
---|
106 | #endif /* __WIN2K_H */
|
---|