ReactOS  0.4.13-dev-66-gc714b7f
misc.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Storport Driver
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Storport helper functions
5  * COPYRIGHT: Copyright 2017 Eric Kohl (eric.kohl@reactos.org)
6  */
7 
8 /* INCLUDES *******************************************************************/
9 
10 #include "precomp.h"
11 
12 #define NDEBUG
13 #include <debug.h>
14 
15 
16 /* FUNCTIONS ******************************************************************/
17 
18 static
20 NTAPI
23  _In_ PIRP Irp,
25 {
26  if (Irp->PendingReturned)
29 }
30 
31 
34  _In_ PDEVICE_OBJECT LowerDevice,
35  _In_ PIRP Irp)
36 {
37  KEVENT Event;
39 
40  ASSERT(LowerDevice);
41 
44 
46 
47  Status = IoCallDriver(LowerDevice, Irp);
48  if (Status == STATUS_PENDING)
49  {
51  if (NT_SUCCESS(Status))
52  Status = Irp->IoStatus.Status;
53  }
54 
55  return Status;
56 }
57 
58 
60 NTAPI
62  _In_ PDEVICE_OBJECT LowerDevice,
63  _In_ PIRP Irp)
64 {
65  ASSERT(LowerDevice);
66 
68  return IoCallDriver(LowerDevice, Irp);
69 }
70 
71 
75 {
76  GUID Guid;
77  ULONG Length;
79 
82  sizeof(Guid),
83  &Guid,
84  &Length);
85  if (!NT_SUCCESS(Status))
87 
88  if (RtlCompareMemory(&Guid, &GUID_BUS_TYPE_PCMCIA, sizeof(GUID)) == sizeof(GUID))
89  return PCMCIABus;
90  else if (RtlCompareMemory(&Guid, &GUID_BUS_TYPE_PCI, sizeof(GUID)) == sizeof(GUID))
91  return PCIBus;
92  else if (RtlCompareMemory(&Guid, &GUID_BUS_TYPE_ISAPNP, sizeof(GUID)) == sizeof(GUID))
93  return PNPISABus;
94 
96 }
97 
98 
99 static
100 ULONG
103 {
105  INT i;
106  ULONG Size;
107 
108  DPRINT1("GetResourceListSize(%p)\n", ResourceList);
109 
110  Size = sizeof(CM_RESOURCE_LIST);
111  if (ResourceList->Count == 0)
112  {
113  DPRINT1("Size: 0x%lx (%u)\n", Size, Size);
114  return Size;
115  }
116 
117  DPRINT1("ResourceList->Count: %lu\n", ResourceList->Count);
118 
119  Descriptor = &ResourceList->List[0];
120  for (i = 0; i < ResourceList->Count; i++)
121  {
122  /* Process resources in CM_FULL_RESOURCE_DESCRIPTOR block number ix. */
123 
124  DPRINT1("PartialResourceList->Count: %lu\n", Descriptor->PartialResourceList.Count);
125 
126  /* Add the size of the current full descriptor */
127  Size += sizeof(CM_FULL_RESOURCE_DESCRIPTOR) +
128  (Descriptor->PartialResourceList.Count - 1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
129 
130  /* Advance to next CM_FULL_RESOURCE_DESCRIPTOR block in memory. */
131  Descriptor = (PCM_FULL_RESOURCE_DESCRIPTOR)(Descriptor->PartialResourceList.PartialDescriptors +
132  Descriptor->PartialResourceList.Count);
133  }
134 
135  DPRINT1("Size: 0x%lx (%u)\n", Size, Size);
136  return Size;
137 }
138 
139 
144 {
146  ULONG Size;
147 
148  DPRINT1("CopyResourceList(%lu %p)\n",
149  PoolType, Source);
150 
151  /* Get the size of the resource list */
153 
154  /* Allocate a new buffer */
156  Size,
158  if (Destination == NULL)
159  return NULL;
160 
161  /* Copy the resource list */
163  Source,
164  Size);
165 
166  return Destination;
167 }
168 
169 
170 NTSTATUS
173  PGUID Guid,
174  USHORT Size,
175  USHORT Version,
177  PVOID InterfaceSpecificData)
178 {
179  KEVENT Event;
181  PIRP Irp;
183  PIO_STACK_LOCATION Stack;
184 
186 
188  DeviceObject,
189  NULL,
190  0,
191  NULL,
192  &Event,
193  &IoStatus);
194  if (Irp == NULL)
196 
198 
199  Stack->MajorFunction = IRP_MJ_PNP;
201  Stack->Parameters.QueryInterface.InterfaceType = Guid;
202  Stack->Parameters.QueryInterface.Size = Size;
203  Stack->Parameters.QueryInterface.Version = Version;
204  Stack->Parameters.QueryInterface.Interface = (PINTERFACE)Interface;
205  Stack->Parameters.QueryInterface.InterfaceSpecificData = InterfaceSpecificData;
206 
207  Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
208 
210  if (Status == STATUS_PENDING)
211  {
213 
214  Status=IoStatus.Status;
215  }
216 
217  return Status;
218 }
219 
220 
221 BOOLEAN
223  PFDO_DEVICE_EXTENSION DeviceExtension,
225  ULONG SystemIoBusNumber,
226  STOR_PHYSICAL_ADDRESS IoAddress,
228  BOOLEAN InIoSpace,
230 {
231  PCM_FULL_RESOURCE_DESCRIPTOR FullDescriptorA, FullDescriptorT;
232  PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptorA, PartialDescriptorT;
233  INT i, j;
234 
235  DPRINT1("TranslateResourceListAddress(%p)\n", DeviceExtension);
236 
237  FullDescriptorA = DeviceExtension->AllocatedResources->List;
238  FullDescriptorT = DeviceExtension->TranslatedResources->List;
239  for (i = 0; i < DeviceExtension->AllocatedResources->Count; i++)
240  {
241  for (j = 0; j < FullDescriptorA->PartialResourceList.Count; j++)
242  {
243  PartialDescriptorA = FullDescriptorA->PartialResourceList.PartialDescriptors + j;
244  PartialDescriptorT = FullDescriptorT->PartialResourceList.PartialDescriptors + j;
245 
246  switch (PartialDescriptorA->Type)
247  {
248  case CmResourceTypePort:
249  DPRINT1("Port: 0x%I64x (0x%lx)\n",
250  PartialDescriptorA->u.Port.Start.QuadPart,
251  PartialDescriptorA->u.Port.Length);
252  if (InIoSpace &&
253  IoAddress.QuadPart >= PartialDescriptorA->u.Port.Start.QuadPart &&
254  IoAddress.QuadPart + NumberOfBytes <= PartialDescriptorA->u.Port.Start.QuadPart + PartialDescriptorA->u.Port.Length)
255  {
256  TranslatedAddress->QuadPart = PartialDescriptorT->u.Port.Start.QuadPart +
257  (IoAddress.QuadPart - PartialDescriptorA->u.Port.Start.QuadPart);
258  return TRUE;
259  }
260  break;
261 
263  DPRINT1("Memory: 0x%I64x (0x%lx)\n",
264  PartialDescriptorA->u.Memory.Start.QuadPart,
265  PartialDescriptorA->u.Memory.Length);
266  if (!InIoSpace &&
267  IoAddress.QuadPart >= PartialDescriptorA->u.Memory.Start.QuadPart &&
268  IoAddress.QuadPart + NumberOfBytes <= PartialDescriptorA->u.Memory.Start.QuadPart + PartialDescriptorA->u.Memory.Length)
269  {
270  TranslatedAddress->QuadPart = PartialDescriptorT->u.Memory.Start.QuadPart +
271  (IoAddress.QuadPart - PartialDescriptorA->u.Memory.Start.QuadPart);
272  return TRUE;
273  }
274  break;
275  }
276  }
277 
278  /* Advance to next CM_FULL_RESOURCE_DESCRIPTOR block in memory. */
279  FullDescriptorA = (PCM_FULL_RESOURCE_DESCRIPTOR)(FullDescriptorA->PartialResourceList.PartialDescriptors +
280  FullDescriptorA->PartialResourceList.Count);
281 
282  FullDescriptorT = (PCM_FULL_RESOURCE_DESCRIPTOR)(FullDescriptorT->PartialResourceList.PartialDescriptors +
283  FullDescriptorT->PartialResourceList.Count);
284  }
285 
286  return FALSE;
287 }
288 
289 
290 NTSTATUS
292  PFDO_DEVICE_EXTENSION DeviceExtension,
293  PULONG Vector,
294  PKIRQL Irql,
298 {
299  PCM_FULL_RESOURCE_DESCRIPTOR FullDescriptor;
300  PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
301  INT i, j;
302 
303  DPRINT1("GetResourceListInterrupt(%p)\n",
304  DeviceExtension);
305 
306  FullDescriptor = DeviceExtension->TranslatedResources->List;
307  for (i = 0; i < DeviceExtension->TranslatedResources->Count; i++)
308  {
309  for (j = 0; j < FullDescriptor->PartialResourceList.Count; j++)
310  {
311  PartialDescriptor = FullDescriptor->PartialResourceList.PartialDescriptors + j;
312 
313  switch (PartialDescriptor->Type)
314  {
316  DPRINT1("Interrupt: Level %lu Vector %lu\n",
317  PartialDescriptor->u.Interrupt.Level,
318  PartialDescriptor->u.Interrupt.Vector);
319 
320  *Vector = PartialDescriptor->u.Interrupt.Vector;
321  *Irql = (KIRQL)PartialDescriptor->u.Interrupt.Level;
323  *ShareVector = (PartialDescriptor->ShareDisposition == CmResourceShareShared) ? TRUE : FALSE;
324  *Affinity = PartialDescriptor->u.Interrupt.Affinity;
325 
326  return STATUS_SUCCESS;
327  }
328  }
329 
330  /* Advance to next CM_FULL_RESOURCE_DESCRIPTOR block in memory. */
331  FullDescriptor = (PCM_FULL_RESOURCE_DESCRIPTOR)(FullDescriptor->PartialResourceList.PartialDescriptors +
332  FullDescriptor->PartialResourceList.Count);
333  }
334 
335  return STATUS_NOT_FOUND;
336 }
337 
338 
339 NTSTATUS
341  PMAPPED_ADDRESS *MappedAddressList,
342  STOR_PHYSICAL_ADDRESS IoAddress,
343  PVOID MappedAddress,
346 {
348 
349  DPRINT1("AllocateAddressMapping()\n");
350 
352  sizeof(MAPPED_ADDRESS),
354  if (Mapping == NULL)
355  {
356  DPRINT1("No memory!\n");
357  return STATUS_NO_MEMORY;
358  }
359 
361 
362  Mapping->NextMappedAddress = *MappedAddressList;
363  *MappedAddressList = Mapping;
364 
365  Mapping->IoAddress = IoAddress;
366  Mapping->MappedAddress = MappedAddress;
367  Mapping->NumberOfBytes = NumberOfBytes;
368  Mapping->BusNumber = BusNumber;
369 
370  return STATUS_SUCCESS;
371 }
372 
373 /* EOF */
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE InterruptMode
Definition: iofuncs.h:798
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
enum _INTERFACE_TYPE INTERFACE_TYPE
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@369::@371 Port
#define STATUS_MORE_PROCESSING_REQUIRED
Definition: shellext.h:63
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN OUT PIO_STATUS_BLOCK IoStatus
Definition: fatprocs.h:2650
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
Definition: irp.c:1069
CM_FULL_RESOURCE_DESCRIPTOR List[1]
Definition: hwresource.cpp:165
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
Definition: halfuncs.h:156
_In_ PIRP Irp
Definition: csq.h:116
PCM_RESOURCE_LIST CopyResourceList(POOL_TYPE PoolType, PCM_RESOURCE_LIST Source)
Definition: misc.c:141
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE _In_ BOOLEAN ShareVector
Definition: iofuncs.h:798
static PVOID Mapping[EMS_PHYSICAL_PAGES]
Definition: emsdrv.c:41
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
LONG NTSTATUS
Definition: precomp.h:26
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@369 u
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@369::@372 Interrupt
struct _CM_FULL_RESOURCE_DESCRIPTOR CM_FULL_RESOURCE_DESCRIPTOR
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@369::@374 Memory
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
Definition: iofuncs.h:2268
LONG NTAPI KeSetEvent(IN PKEVENT Event, IN KPRIORITY Increment, IN BOOLEAN Wait)
Definition: eventobj.c:159
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: wait.c:416
NTSTATUS AllocateAddressMapping(PMAPPED_ADDRESS *MappedAddressList, STOR_PHYSICAL_ADDRESS IoAddress, PVOID MappedAddress, ULONG NumberOfBytes, ULONG BusNumber)
Definition: misc.c:340
_Out_ PKIRQL Irql
Definition: csq.h:179
const MUI_LANGUAGE_RESOURCE ResourceList[]
Definition: muilanguages.h:414
int32_t INT
Definition: typedefs.h:56
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR CM_PARTIAL_RESOURCE_DESCRIPTOR
NTSTATUS NTAPI ForwardIrpAndWait(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: misc.c:33
INTERFACE_TYPE GetBusInterface(PDEVICE_OBJECT DeviceObject)
Definition: misc.c:73
#define CmResourceTypePort
Definition: hwresource.cpp:123
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:515
FORCEINLINE VOID IoCopyCurrentIrpStackLocationToNext(_Inout_ PIRP Irp)
Definition: iofuncs.h:2820
UCHAR KIRQL
Definition: env_spec_w32.h:591
CM_PARTIAL_RESOURCE_LIST PartialResourceList
Definition: hwresource.cpp:160
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define TAG_RESOURCE_LIST
Definition: precomp.h:30
struct _CM_FULL_RESOURCE_DESCRIPTOR * PCM_FULL_RESOURCE_DESCRIPTOR
BOOLEAN TranslateResourceListAddress(PFDO_DEVICE_EXTENSION DeviceExtension, INTERFACE_TYPE BusType, ULONG SystemIoBusNumber, STOR_PHYSICAL_ADDRESS IoAddress, ULONG NumberOfBytes, BOOLEAN InIoSpace, PPHYSICAL_ADDRESS TranslatedAddress)
Definition: misc.c:222
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:434
KAFFINITY * PKAFFINITY
Definition: basetsd.h:197
#define TAG_ADDRESS_MAPPING
Definition: precomp.h:31
unsigned char BOOLEAN
static GUID * Guid
Definition: apphelp.c:93
smooth NULL
Definition: ftsmooth.c:416
enum _KINTERRUPT_MODE KINTERRUPT_MODE
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
Definition: pnpmgr.c:4202
static ULONG GetResourceListSize(PCM_RESOURCE_LIST ResourceList)
Definition: misc.c:101
struct _INTERFACE * PINTERFACE
static NTSTATUS NTAPI ForwardIrpAndWaitCompletion(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ PVOID Context)
Definition: misc.c:21
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
#define STATUS_NOT_FOUND
Definition: shellext.h:67
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_PENDING
Definition: ntstatus.h:82
INT POOL_TYPE
Definition: typedefs.h:76
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
Definition: halfuncs.h:170
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2875
#define IRP_MN_QUERY_INTERFACE
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
char * PBOOLEAN
Definition: retypes.h:11
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
Definition: hwresource.cpp:119
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2647
struct _CM_RESOURCE_LIST CM_RESOURCE_LIST
Status
Definition: gdiplustypes.h:24
#define _In_
Definition: no_sal2.h:204
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
unsigned short USHORT
Definition: pedump.c:61
NTSTATUS QueryBusInterface(PDEVICE_OBJECT DeviceObject, PGUID Guid, USHORT Size, USHORT Version, PBUS_INTERFACE_STANDARD Interface, PVOID InterfaceSpecificData)
Definition: misc.c:171
#define STATUS_NO_MEMORY
Definition: ntstatus.h:246
unsigned int * PULONG
Definition: retypes.h:1
NTSTATUS NTAPI ForwardIrpAndForget(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: misc.c:59
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
#define CmResourceTypeInterrupt
Definition: hwresource.cpp:124
#define DPRINT1
Definition: precomp.h:8
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
PCM_RESOURCE_LIST TranslatedResources
Definition: precomp.h:98
#define CM_RESOURCE_INTERRUPT_LATCHED
Definition: cmtypes.h:144
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:997
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:409
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:565
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3149
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2771
#define CmResourceTypeMemory
Definition: hwresource.cpp:125
return STATUS_SUCCESS
Definition: btrfs.c:2725
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
LONGLONG QuadPart
Definition: typedefs.h:112
NTSTATUS GetResourceListInterrupt(PFDO_DEVICE_EXTENSION DeviceExtension, PULONG Vector, PKIRQL Irql, KINTERRUPT_MODE *InterruptMode, PBOOLEAN ShareVector, PKAFFINITY Affinity)
Definition: misc.c:291
_In_ PSTORAGE_PROPERTY_ID _Outptr_ PSTORAGE_DESCRIPTOR_HEADER * Descriptor
Definition: classpnp.h:966
PCM_RESOURCE_LIST AllocatedResources
Definition: precomp.h:97