ReactOS  0.4.14-dev-49-gfb4591c
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  ULONG Size;
106 
107  DPRINT1("GetResourceListSize(%p)\n", ResourceList);
108 
109  Size = sizeof(CM_RESOURCE_LIST);
110  if (ResourceList->Count == 0)
111  {
112  DPRINT1("Size: 0x%lx (%u)\n", Size, Size);
113  return Size;
114  }
115 
116  DPRINT1("ResourceList->Count: %lu\n", ResourceList->Count);
117 
118  Descriptor = &ResourceList->List[0];
119 
120  DPRINT1("PartialResourceList->Count: %lu\n", Descriptor->PartialResourceList.Count);
121 
122  /* Add the size of the partial descriptors */
123  if (Descriptor->PartialResourceList.Count > 1)
124  Size += (Descriptor->PartialResourceList.Count - 1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
125 
126  DPRINT1("Size: 0x%lx (%u)\n", Size, Size);
127  return Size;
128 }
129 
130 
135 {
137  ULONG Size;
138 
139  DPRINT1("CopyResourceList(%lu %p)\n",
140  PoolType, Source);
141 
142  /* Get the size of the resource list */
144 
145  /* Allocate a new buffer */
147  Size,
149  if (Destination == NULL)
150  return NULL;
151 
152  /* Copy the resource list */
154  Source,
155  Size);
156 
157  return Destination;
158 }
159 
160 
161 NTSTATUS
164  PGUID Guid,
165  USHORT Size,
166  USHORT Version,
168  PVOID InterfaceSpecificData)
169 {
170  KEVENT Event;
172  PIRP Irp;
174  PIO_STACK_LOCATION Stack;
175 
177 
179  DeviceObject,
180  NULL,
181  0,
182  NULL,
183  &Event,
184  &IoStatus);
185  if (Irp == NULL)
187 
189 
190  Stack->MajorFunction = IRP_MJ_PNP;
192  Stack->Parameters.QueryInterface.InterfaceType = Guid;
193  Stack->Parameters.QueryInterface.Size = Size;
194  Stack->Parameters.QueryInterface.Version = Version;
195  Stack->Parameters.QueryInterface.Interface = (PINTERFACE)Interface;
196  Stack->Parameters.QueryInterface.InterfaceSpecificData = InterfaceSpecificData;
197 
198  Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
199 
201  if (Status == STATUS_PENDING)
202  {
204 
205  Status=IoStatus.Status;
206  }
207 
208  return Status;
209 }
210 
211 
212 BOOLEAN
214  PFDO_DEVICE_EXTENSION DeviceExtension,
216  ULONG SystemIoBusNumber,
217  STOR_PHYSICAL_ADDRESS IoAddress,
219  BOOLEAN InIoSpace,
221 {
222  PCM_FULL_RESOURCE_DESCRIPTOR FullDescriptorA, FullDescriptorT;
223  PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptorA, PartialDescriptorT;
224  INT i, j;
225 
226  DPRINT1("TranslateResourceListAddress(%p)\n", DeviceExtension);
227 
228  FullDescriptorA = DeviceExtension->AllocatedResources->List;
229  FullDescriptorT = DeviceExtension->TranslatedResources->List;
230  for (i = 0; i < DeviceExtension->AllocatedResources->Count; i++)
231  {
232  for (j = 0; j < FullDescriptorA->PartialResourceList.Count; j++)
233  {
234  PartialDescriptorA = FullDescriptorA->PartialResourceList.PartialDescriptors + j;
235  PartialDescriptorT = FullDescriptorT->PartialResourceList.PartialDescriptors + j;
236 
237  switch (PartialDescriptorA->Type)
238  {
239  case CmResourceTypePort:
240  DPRINT1("Port: 0x%I64x (0x%lx)\n",
241  PartialDescriptorA->u.Port.Start.QuadPart,
242  PartialDescriptorA->u.Port.Length);
243  if (InIoSpace &&
244  IoAddress.QuadPart >= PartialDescriptorA->u.Port.Start.QuadPart &&
245  IoAddress.QuadPart + NumberOfBytes <= PartialDescriptorA->u.Port.Start.QuadPart + PartialDescriptorA->u.Port.Length)
246  {
247  TranslatedAddress->QuadPart = PartialDescriptorT->u.Port.Start.QuadPart +
248  (IoAddress.QuadPart - PartialDescriptorA->u.Port.Start.QuadPart);
249  return TRUE;
250  }
251  break;
252 
254  DPRINT1("Memory: 0x%I64x (0x%lx)\n",
255  PartialDescriptorA->u.Memory.Start.QuadPart,
256  PartialDescriptorA->u.Memory.Length);
257  if (!InIoSpace &&
258  IoAddress.QuadPart >= PartialDescriptorA->u.Memory.Start.QuadPart &&
259  IoAddress.QuadPart + NumberOfBytes <= PartialDescriptorA->u.Memory.Start.QuadPart + PartialDescriptorA->u.Memory.Length)
260  {
261  TranslatedAddress->QuadPart = PartialDescriptorT->u.Memory.Start.QuadPart +
262  (IoAddress.QuadPart - PartialDescriptorA->u.Memory.Start.QuadPart);
263  return TRUE;
264  }
265  break;
266  }
267  }
268 
269  /* Advance to next CM_FULL_RESOURCE_DESCRIPTOR block in memory. */
270  FullDescriptorA = (PCM_FULL_RESOURCE_DESCRIPTOR)(FullDescriptorA->PartialResourceList.PartialDescriptors +
271  FullDescriptorA->PartialResourceList.Count);
272 
273  FullDescriptorT = (PCM_FULL_RESOURCE_DESCRIPTOR)(FullDescriptorT->PartialResourceList.PartialDescriptors +
274  FullDescriptorT->PartialResourceList.Count);
275  }
276 
277  return FALSE;
278 }
279 
280 
281 NTSTATUS
283  PFDO_DEVICE_EXTENSION DeviceExtension,
284  PULONG Vector,
285  PKIRQL Irql,
289 {
290  PCM_FULL_RESOURCE_DESCRIPTOR FullDescriptor;
291  PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
292  INT i, j;
293 
294  DPRINT1("GetResourceListInterrupt(%p)\n",
295  DeviceExtension);
296 
297  FullDescriptor = DeviceExtension->TranslatedResources->List;
298  for (i = 0; i < DeviceExtension->TranslatedResources->Count; i++)
299  {
300  for (j = 0; j < FullDescriptor->PartialResourceList.Count; j++)
301  {
302  PartialDescriptor = FullDescriptor->PartialResourceList.PartialDescriptors + j;
303 
304  switch (PartialDescriptor->Type)
305  {
307  DPRINT1("Interrupt: Level %lu Vector %lu\n",
308  PartialDescriptor->u.Interrupt.Level,
309  PartialDescriptor->u.Interrupt.Vector);
310 
311  *Vector = PartialDescriptor->u.Interrupt.Vector;
312  *Irql = (KIRQL)PartialDescriptor->u.Interrupt.Level;
314  *ShareVector = (PartialDescriptor->ShareDisposition == CmResourceShareShared) ? TRUE : FALSE;
315  *Affinity = PartialDescriptor->u.Interrupt.Affinity;
316 
317  return STATUS_SUCCESS;
318  }
319  }
320 
321  /* Advance to next CM_FULL_RESOURCE_DESCRIPTOR block in memory. */
322  FullDescriptor = (PCM_FULL_RESOURCE_DESCRIPTOR)(FullDescriptor->PartialResourceList.PartialDescriptors +
323  FullDescriptor->PartialResourceList.Count);
324  }
325 
326  return STATUS_NOT_FOUND;
327 }
328 
329 
330 NTSTATUS
332  PMAPPED_ADDRESS *MappedAddressList,
333  STOR_PHYSICAL_ADDRESS IoAddress,
334  PVOID MappedAddress,
337 {
339 
340  DPRINT1("AllocateAddressMapping()\n");
341 
343  sizeof(MAPPED_ADDRESS),
345  if (Mapping == NULL)
346  {
347  DPRINT1("No memory!\n");
348  return STATUS_NO_MEMORY;
349  }
350 
352 
353  Mapping->NextMappedAddress = *MappedAddressList;
354  *MappedAddressList = Mapping;
355 
356  Mapping->IoAddress = IoAddress;
357  Mapping->MappedAddress = MappedAddress;
358  Mapping->NumberOfBytes = NumberOfBytes;
359  Mapping->BusNumber = BusNumber;
360 
361  return STATUS_SUCCESS;
362 }
363 
364 /* 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
#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:132
_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
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@371::@374 Interrupt
_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:331
_Out_ PKIRQL Irql
Definition: csq.h:179
const MUI_LANGUAGE_RESOURCE ResourceList[]
Definition: muilanguages.h:414
int32_t INT
Definition: typedefs.h:56
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
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@371::@376 Memory
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:213
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:435
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
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@371 u
enum _KINTERRUPT_MODE KINTERRUPT_MODE
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@371::@373 Port
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
Definition: pnpmgr.c:4228
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:2891
#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:162
#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:104
#define CM_RESOURCE_INTERRUPT_LATCHED
Definition: cmtypes.h:144
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:998
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:409
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:566
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2772
#define CmResourceTypeMemory
Definition: hwresource.cpp:125
return STATUS_SUCCESS
Definition: btrfs.c:2966
_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:282
_In_ PSTORAGE_PROPERTY_ID _Outptr_ PSTORAGE_DESCRIPTOR_HEADER * Descriptor
Definition: classpnp.h:966
PCM_RESOURCE_LIST AllocatedResources
Definition: precomp.h:103