ReactOS 0.4.16-dev-306-g647d351
fxresourcecollection.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxResourceCollection.cpp
8
9Abstract:
10
11 This module implements a base object for derived collection classes and
12 the derived collection classes.
13
14Author:
15
16
17
18Environment:
19
20 Both kernel and user mode
21
22Revision History:
23
24--*/
25
26#include "fxsupportpch.hpp"
27
28extern "C" {
29#if defined(EVENT_TRACING)
30#include "FxResourceCollection.tmh"
31#endif
32}
33
37 )
38/*++
39
40Routine Description:
41 Removes an entry from the collection and then deletes it if found. The
42 caller must have removal permissions to perform this action.
43
44Arguments:
45 Index - zero based index into the collection at which to perform the removal
46
47Return Value:
48 TRUE if the item was found and deleted, FALSE otherwise
49
50 --*/
51{
54 KIRQL irql;
55
56 if (IsRemoveAllowed() == FALSE) {
58 "Removes not allowed on handle %p, remove at index %d"
59 "failed", GetObjectHandle(), Index);
60
62 return FALSE;
63 }
64
65 pObject = NULL;
66
67 Lock(&irql);
68
70 if (pEntry != NULL) {
71
72 //
73 // Mark the list as changed so when we go to create a WDM resource list we
74 // know if a new list is needed.
75 //
77
78 pObject = pEntry->m_Object;
79
80 //
81 // Remove the entry
82 //
84 }
85 Unlock(irql);
86
87 if (pObject != NULL) {
88 //
89 // Delete the object since we created it
90 //
92 pObject = NULL;
93
94 return TRUE;
95 }
96 else {
97 return FALSE;
98 }
99}
100
106 )
107/*++
108
109Routine Description:
110 Adds an object into the collection at the specified index.
111
112Arguments:
113 Index - zero baesd index in which to insert into the list. WDF_INSERT_AT_END
114 is a special value which indicates that the insertion is an append.
115
116 Object - object to add
117
118Return Value:
119 NTSTATUS
120
121 --*/
122{
123 FxCollectionEntry *pNew;
126 KIRQL irql;
127
128 if (IsAddAllowed() == FALSE) {
130 "Adds not allowed on handle %p, add at index %d"
131 "failed", GetObjectHandle(), Index);
132
134
136 }
137
138 Lock(&irql);
139
140 ple = NULL;
142
144
145 if (pNew != NULL) {
146 //
147 // Inserting at the current count (i.e. one past the end) is the same
148 // as append.
149 //
150 if (Index == WDF_INSERT_AT_END || Index == Count()) {
151 ple = &m_ListHead;
152 }
153 else {
155 ULONG i;
156
157 for (cur = Start(), end = End(), i = 0;
158 cur != end;
159 cur = cur->Next(), i++) {
160 if (i == Index) {
161 ple = &cur->m_ListEntry;
162 break;
163 }
164 }
165
166 if (ple == NULL) {
167 delete pNew;
169 }
170 }
171 }
172 else {
174 }
175
176 if (NT_SUCCESS(status)) {
177 PLIST_ENTRY blink;
178
179 // ple now points to the list entry which we will insert our node
180 // *before*
181
182 blink = ple->Blink;
183
184 // Link the previous with the new entry
185 blink->Flink = &pNew->m_ListEntry;
186 pNew->m_ListEntry.Blink = blink;
187
188 // Link the current with the new entry
189 pNew->m_ListEntry.Flink = ple;
190 ple->Blink = &pNew->m_ListEntry;
191
192 AddEntry(pNew, Object);
193
194 //
195 // Mark the list as changed so when we go to create a WDM resource list
196 // we know if a new list is needed.
197 //
198 MarkChanged();
199 }
200
201 Unlock(irql);
202
203 if (!NT_SUCCESS(status)) {
204 Object->DeleteFromFailedCreate();
205 }
206
207 return status;
208}
209
213 __deref_in PIO_RESOURCE_LIST* WdmResourceList
214 )
215/*++
216
217Routine Description:
218 Builds up the collection with FxResourceIo objects based on the passed in
219 WDM io resource list
220
221Arguments:
222 WdmResourceList - list which specifies the io resource objects to create
223
224Return Value:
225 NTSTATUS
226
227 --*/
228{
229 PIO_RESOURCE_DESCRIPTOR pWdmDescriptor;
230 ULONG i, count;
232
233 pWdmDescriptor = &(*WdmResourceList)->Descriptors[0];
234 count = (*WdmResourceList)->Count;
236
237 for (i = 0; i < count; i++) {
238 //
239 // Now create a new resource object for each resource
240 // in our list.
241 //
242 FxResourceIo *pResource;
243
244 pResource = new(GetDriverGlobals())
245 FxResourceIo(GetDriverGlobals(), pWdmDescriptor);
246
247 if (pResource == NULL) {
248 //
249 // We failed, clean up, and exit. Since we are only
250 // keeping references on the master collection, if
251 // we free this, everything else will go away too.
252 //
254 }
255
256 if (NT_SUCCESS(status)) {
257 status = pResource->AssignParentObject(this);
258
259 //
260 // See notes in previous AssignParentObject as to why
261 // we are asserting.
262 //
265
267 }
268
269 if (!NT_SUCCESS(status)) {
270 break;
271 }
272
273 pWdmDescriptor++;
274 }
275
276 if (NT_SUCCESS(status)) {
278 }
279
280 if (NT_SUCCESS(status)) {
281 *WdmResourceList = (PIO_RESOURCE_LIST) pWdmDescriptor;
282 }
283
284 return status;
285}
286
290 __in PCM_RESOURCE_LIST WdmResourceList,
291 __in UCHAR AccessFlags
292 )
293/*++
294
295Routine Description:
296 Builds up the collection with FxResourceCm objects based on the passed in
297 WDM io resource list.
298
299Arguments:
300 WdmResourceList - list which specifies the io resource objects to create
301
302 AccessFlags - permissions to be associated with the list
303
304Return Value:
305 NTSTATUS
306
307 --*/
308{
310
311 //
312 // Predispose to success
313 //
315
316 Clear();
317
318 m_AccessFlags = AccessFlags;
319
320 if (WdmResourceList != NULL) {
322 ULONG count, i;
323
324 //
325 // We only expect to see one full resource descriptor.
326 //
327 ASSERT(WdmResourceList->Count == 1);
328
329 count = WdmResourceList->List[0].PartialResourceList.Count;
330 pDescriptor = WdmResourceList->List[0].PartialResourceList.PartialDescriptors;
331
332 for(i = 0; i < count; i++, pDescriptor++) {
333 FxResourceCm *pResource;
334
335 pResource = new(GetDriverGlobals())
336 FxResourceCm(GetDriverGlobals(), pDescriptor);
337
338 if (pResource == NULL) {
340 }
341
342 if (NT_SUCCESS(status)) {
343 status = pResource->AssignParentObject(this);
344
345 //
346 // Since we control our own lifetime here, the assign should
347 // always work.
348 //
350
352 }
353
354 if (!NT_SUCCESS(status)) {
355 Clear();
356 break;
357 }
358 }
359 }
360
361 return status;
362}
363
368 )
369/*++
370
371Routine Description:
372 Allocates and initializes a WDM CM resource list based off of the current
373 contents of this collection.
374
375Arguments:
376 PoolType - the pool type from which to allocate the resource list
377
378Return Value:
379 a new resource list upon success, NULL upon failure
380
381 --*/
382{
383 PCM_RESOURCE_LIST pWdmResourceList;
384 ULONG size;
386
387 pWdmResourceList = NULL;
389
390 if (Count()) {
391 //
392 // NOTE: This function assumes all resources are on the same bus
393 // and therefore there is only one FULL_RESOURCE_DESCRIPTOR.
394 //
395 size = sizeof(CM_RESOURCE_LIST) +
396 (sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) * (Count() - 1));
397
398 pWdmResourceList = (PCM_RESOURCE_LIST)
400
401 if (pWdmResourceList != NULL) {
404
405 RtlZeroMemory(pWdmResourceList, size);
406
407 pWdmResourceList->Count = 1; // We only return one full descriptor
408
409 pWdmResourceList->List[0].PartialResourceList.Version = 1;
410 pWdmResourceList->List[0].PartialResourceList.Revision = 1;
411 pWdmResourceList->List[0].PartialResourceList.Count = Count();
412
413 pDescriptor =
414 pWdmResourceList->List[0].PartialResourceList.PartialDescriptors;
415
416 end = End();
417 for (cur = Start(); cur != end; cur = cur->Next()) {
418 FxResourceCm *pResource;
419
420 pResource = (FxResourceCm*) cur->m_Object;
421
422 RtlCopyMemory(pDescriptor,
423 &pResource->m_Descriptor,
424 sizeof(pResource->m_Descriptor));
425 pDescriptor++;
426 }
427 }
428 }
429
430 return pWdmResourceList;
431}
432
433ULONG
435 VOID
436 )
437{
438 ULONG count;
439 KIRQL irql;
440
441 Lock(&irql);
442 count = Count();
443 Unlock(irql);
444
445 return count;
446}
447
451 )
452{
454 KIRQL irql;
455
456 Lock(&irql);
458 Unlock(irql);
459
460 if (pObject == NULL) {
461 return NULL;
462 }
463 else {
464 //
465 // Copy the current descriptor to the clone and return it
466 //
467 RtlCopyMemory(&pObject->m_DescriptorClone,
468 &pObject->m_Descriptor,
469 sizeof(pObject->m_Descriptor));
470
471 return &pObject->m_DescriptorClone;
472 }
473}
474
478 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
479 __in PIO_RESOURCE_REQUIREMENTS_LIST WdmRequirementsList,
480 __in UCHAR AccessFlags
481 )
482/*++
483
484Routine Description:
485 Allocates and populates an FxIoResReqList based on the WDM resource
486 requirements list.
487
488Arguments:
489 WdmRequirementsList - a list of IO_RESOURCE_LISTs which will indicate how
490 to fill in the returned collection object
491
492 AccessFlags - permissions to associate with the newly created object
493
494Return Value:
495 a new object upon success, NULL upon failure
496
497 --*/
498
499{
501 ULONG i;
502
503 pIoResReqList = new(FxDriverGlobals, WDF_NO_OBJECT_ATTRIBUTES)
504 FxIoResReqList(FxDriverGlobals, AccessFlags);
505
506 if (pIoResReqList != NULL) {
507 PIO_RESOURCE_LIST pWdmResourceList;
509
510 if (WdmRequirementsList == NULL) {
511 return pIoResReqList;
512 }
513
515 pWdmResourceList = &WdmRequirementsList->List[0];
516
517 pIoResReqList->m_InterfaceType = WdmRequirementsList->InterfaceType;
518 pIoResReqList->m_SlotNumber = WdmRequirementsList->SlotNumber;
519
520 for (i = 0; i < WdmRequirementsList->AlternativeLists; i++) {
522
523 pResList = new(FxDriverGlobals, WDF_NO_OBJECT_ATTRIBUTES)
524 FxIoResList(FxDriverGlobals, pIoResReqList);
525
526 if (pResList != NULL) {
528
529 //
530 // Since we control our own lifetime, assigning the parent should
531 // never fail.
532 //
534
535 status = pResList->BuildFromWdmList(&pWdmResourceList);
536 }
537 else {
538 //
539 // We failed to allocate a child collection. Clean up
540 // and break out of the loop.
541 //
543 }
544
545 if (!NT_SUCCESS(status)) {
546 break;
547 }
548 }
549
550 if (!NT_SUCCESS(status)) {
551 //
552 // Cleanup and return a NULL object
553 //
556 }
557 }
558
559 return pIoResReqList;
560}
561
565 VOID
566 )
567/*++
568
569Routine Description:
570 Creates a WDM io resource requirements list based off of the current
571 contents of the collection
572
573Arguments:
574 None
575
576Return Value:
577 new WDM io resource requirements list allocated out of paged pool upon success,
578 NULL upon failure or an empty list
579
580 --*/
581{
582 PIO_RESOURCE_REQUIREMENTS_LIST pRequirementsList;
585 ULONG totalDescriptors;
586 ULONG size;
587 ULONG count;
588 ULONG tmp;
590
591 totalDescriptors = 0;
592 pRequirementsList = NULL;
593
594 count = Count();
596
597 if (count > 0) {
598 //
599 // The collection object should contain a set of child collections
600 // with each of the various requirement lists. Use the number of
601 // these collections to determine the size of our requirements
602 // list.
603 //
604 end = End();
605 for (cur = Start(); cur != end; cur = cur->Next()) {
606 status = RtlULongAdd(totalDescriptors,
607 ((FxIoResList *) cur->m_Object)->Count(),
608 &totalDescriptors);
609
610 if (!NT_SUCCESS(status)) {
611 goto Overflow;
612 }
613 }
614
615 //
616 // We now have enough information to determine how much memory we
617 // need to allocate for our requirements list.
618 //
619 // size = sizeof(IO_RESOURCE_REQUIREMENTS_LIST) +
620 // (sizeof(IO_RESOURCE_LIST) * (count - 1)) +
621 // (sizeof(IO_RESOURCE_DESCRIPTOR) * totalDescriptors) -
622 // (sizeof(IO_RESOURCE_DESCRIPTOR) * count);
623 //
624 // sizeof(IO_RESOURCE_DESCRIPTOR) * count is subtracted off because
625 // each IO_RESOURCE_LIST has an embedded IO_RESOURCE_DESCRIPTOR in it
626 // and we don't want to overallocated.
627 //
628
629 //
630 // To handle overflow each mathematical operation is split out into an
631 // overflow safe call.
632 //
634
635 // sizeof(IO_RESOURCE_LIST) * (count - 1)
636 status = RtlULongMult(sizeof(IO_RESOURCE_LIST), count - 1, &tmp);
637 if (!NT_SUCCESS(status)) {
638 goto Overflow;
639 }
640
641 status = RtlULongAdd(size, tmp, &size);
642 if (!NT_SUCCESS(status)) {
643 goto Overflow;
644 }
645
646 // (sizeof(IO_RESOURCE_DESCRIPTOR) * totalDescriptors)
647 status = RtlULongMult(sizeof(IO_RESOURCE_DESCRIPTOR),
648 totalDescriptors,
649 &tmp);
650 if (!NT_SUCCESS(status)) {
651 goto Overflow;
652 }
653
654 status = RtlULongAdd(size, tmp, &size);
655 if (!NT_SUCCESS(status)) {
656 goto Overflow;
657 }
658
659 // - sizeof(IO_RESOURCE_DESCRIPTOR) * Count() (note the subtraction!)
660 status = RtlULongMult(sizeof(IO_RESOURCE_DESCRIPTOR), count, &tmp);
661 if (!NT_SUCCESS(status)) {
662 goto Overflow;
663 }
664
665 // Sub, not Add!
666 status = RtlULongSub(size, tmp, &size);
667 if (!NT_SUCCESS(status)) {
668 goto Overflow;
669 }
670
671 pRequirementsList = (PIO_RESOURCE_REQUIREMENTS_LIST)
673
674 if (pRequirementsList != NULL) {
676 FxResourceIo *pResource;
677
678 pList = pRequirementsList->List;
679
680 //
681 // Start by zero initializing our structure
682 //
683 RtlZeroMemory(pRequirementsList, size);
684
685 //
686 // InterfaceType and BusNumber are unused for WDM, but InterfaceType
687 // is used by the arbiters.
688 //
689 pRequirementsList->InterfaceType = m_InterfaceType;
690
691 pRequirementsList->SlotNumber = m_SlotNumber;
692
693 //
694 // Now populate the requirements list with the resources from
695 // our collections.
696 //
697 pRequirementsList->ListSize = size;
698 pRequirementsList->AlternativeLists = Count();
699
700 end = End();
701 for (cur = Start(); cur != end; cur = cur->Next()) {
703 PIO_RESOURCE_DESCRIPTOR pDescriptor;
704 FxCollectionEntry *pIoResCur, *pIoResEnd;
705
707
708 pList->Version = 1;
709 pList->Revision = 1;
710 pList->Count = pIoResList->Count();
711
712 pDescriptor = pList->Descriptors;
713
714 pIoResEnd = pIoResList->End();
715 for (pIoResCur = pIoResList->Start();
716 pIoResCur != pIoResEnd;
717 pIoResCur = pIoResCur->Next()) {
718
719 pResource = (FxResourceIo *) pIoResCur->m_Object;
720 RtlCopyMemory(pDescriptor,
721 &pResource->m_Descriptor,
722 sizeof(pResource->m_Descriptor));
723 pDescriptor++;
724 }
725
726 pList = (PIO_RESOURCE_LIST) pDescriptor;
727 }
728 }
729 }
730
731 return pRequirementsList;
732
733Overflow:
735 "Integer overflow occured when computing size of "
736 "IO_RESOURCE_REQUIREMENTS_LIST");
737
738 return NULL;
739}
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
PCM_PARTIAL_RESOURCE_DESCRIPTOR GetDescriptor(__in ULONG Index)
_Must_inspect_result_ PCM_RESOURCE_LIST CreateWdmList(__in __drv_strictTypeMatch(__drv_typeExpr) POOL_TYPE PoolType=PagedPool)
_Must_inspect_result_ NTSTATUS BuildFromWdmList(__in PCM_RESOURCE_LIST ResourceList, __in UCHAR AccessFlags)
FxObject * m_Object
FxCollectionEntry * Next(VOID)
LIST_ENTRY m_ListEntry
BOOLEAN Add(__in FxObject *Item)
_Must_inspect_result_ NTSTATUS BuildFromWdmList(__deref_in PIO_RESOURCE_LIST *WdmResourceList)
FxIoResReqList * m_OwningList
Definition: fxresource.hpp:746
_Must_inspect_result_ PIO_RESOURCE_REQUIREMENTS_LIST CreateWdmList(VOID)
static _Must_inspect_result_ FxIoResReqList * _CreateFromWdmList(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PIO_RESOURCE_REQUIREMENTS_LIST WdmRequirementsList, __in UCHAR AccessFlags)
INTERFACE_TYPE m_InterfaceType
Definition: fxresource.hpp:716
_Must_inspect_result_ NTSTATUS AssignParentObject(__in FxObject *ParentObject)
Definition: fxobject.cpp:529
virtual VOID DeleteObject(VOID)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
Definition: fxobject.hpp:1474
CM_PARTIAL_RESOURCE_DESCRIPTOR m_Descriptor
Definition: fxresource.hpp:251
BOOLEAN IsRemoveAllowed(VOID)
Definition: fxresource.hpp:311
BOOLEAN RemoveAndDelete(__in ULONG Index)
BOOLEAN IsAddAllowed(VOID)
Definition: fxresource.hpp:319
_Must_inspect_result_ NTSTATUS AddAt(__in ULONG Index, __in FxObject *Object)
VOID MarkChanged(VOID)
Definition: fxresource.hpp:327
IO_RESOURCE_DESCRIPTOR m_Descriptor
Definition: fxresource.hpp:224
static __inline PVOID MxAllocatePoolWithTag(__in POOL_TYPE PoolType, __in SIZE_T NumberOfBytes, __in ULONG Tag)
Definition: mxmemorykm.h:30
#define __in
Definition: dbghelp.h:35
#define TRACINGPNP
Definition: dbgtrace.h:67
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
KIRQL irql
Definition: wave.h:1
#define __drv_strictTypeMatch(mode)
Definition: driverspecs.h:330
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define PagedPool
Definition: env_spec_w32.h:308
FxChildList * pList
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
PFX_DRIVER_GLOBALS pFxDriverGlobals
return pObject GetObjectHandle()
PSINGLE_LIST_ENTRY ple
FxVerifierDbgBreakPoint(pFxDriverGlobals)
PLIST_ENTRY pEntry
Definition: fxioqueue.cpp:4484
return pTarget Start()
FxObject * pObject
FxCollectionEntry * cur
FxIoResList * pIoResList
FxIoResList * pResList
FxIoResReqList * pIoResReqList
GLuint GLuint end
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
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
struct _CM_RESOURCE_LIST CM_RESOURCE_LIST
struct _CM_RESOURCE_LIST * PCM_RESOURCE_LIST
#define ASSERT(a)
Definition: mode.c:44
static void Clear(void)
Definition: treeview.c:388
#define _Must_inspect_result_
Definition: no_sal2.h:62
int Count
Definition: noreturn.cpp:7
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
@ Unlock
Definition: ntsecapi.h:294
#define STATUS_ARRAY_BOUNDS_EXCEEDED
Definition: ntstatus.h:376
#define STATUS_SUCCESS
Definition: shellext.h:65
#define __deref_in
Definition: specstrings.h:137
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
_Must_inspect_result_ FxCollectionEntry * FindEntry(__in ULONG Index)
_Must_inspect_result_ FxCollectionEntry * Start(VOID)
NTSTATUS RemoveEntry(__in FxCollectionEntry *Entry)
VOID AddEntry(__in FxCollectionEntry *Node, __in FxObject *Item)
_Must_inspect_result_ FxObject * GetItem(__in ULONG Index)
_Must_inspect_result_ FxCollectionEntry * End(VOID)
_Must_inspect_result_ FxCollectionEntry * AllocateEntry(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
CM_PARTIAL_RESOURCE_LIST PartialResourceList
Definition: hwresource.cpp:160
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
Definition: hwresource.cpp:119
CM_FULL_RESOURCE_DESCRIPTOR List[1]
Definition: hwresource.cpp:165
INTERFACE_TYPE InterfaceType
Definition: iotypes.h:2742
IO_RESOURCE_LIST List[1]
Definition: iotypes.h:2747
Definition: typedefs.h:120
struct _LIST_ENTRY * Blink
Definition: typedefs.h:122
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
Definition: ps.c:97
INT POOL_TYPE
Definition: typedefs.h:78
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
#define WDF_INSERT_AT_END
Definition: wdfresource.h:50
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
#define WDF_NO_OBJECT_ATTRIBUTES
Definition: wdftypes.h:105
struct _IO_RESOURCE_LIST * PIO_RESOURCE_LIST
struct _IO_RESOURCE_REQUIREMENTS_LIST * PIO_RESOURCE_REQUIREMENTS_LIST
struct _IO_RESOURCE_REQUIREMENTS_LIST IO_RESOURCE_REQUIREMENTS_LIST
unsigned char UCHAR
Definition: xmlstorage.h:181