ReactOS 0.4.16-dev-1946-g52006dd
CResourceNode Class Reference

#include <ResourceNode.h>

Inheritance diagram for CResourceNode:
Collaboration diagram for CResourceNode:

Public Member Functions

 CResourceNode (_In_ CDeviceNode *Node, _In_ PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor, _In_ PSP_CLASSIMAGELIST_DATA ImageListData)
 
 ~CResourceNode ()
 
virtual bool SetupNode ()
 
- Public Member Functions inherited from CNode
 CNode (_In_ NodeType Type, _In_ PSP_CLASSIMAGELIST_DATA ImageListData)
 
 CNode (_In_ const CNode &Node)
 
virtual ~CNode ()
 
virtual bool SetupNode ()=0
 
NodeType GetNodeType ()
 
LPGUID GetClassGuid ()
 
LPWSTR GetDisplayName ()
 
INT GetClassImage ()
 
LPWSTR GetDeviceId ()
 
bool HasProperties ()
 

Additional Inherited Members

- Protected Attributes inherited from CNode
NodeType m_NodeType
 
PSP_CLASSIMAGELIST_DATA m_ImageListData
 
LPWSTR m_DeviceId
 
WCHAR m_DisplayName [DISPLAY_NAME_LEN]
 
GUID m_ClassGuid
 
INT m_ClassImage
 

Detailed Description

Definition at line 6 of file ResourceNode.h.

Constructor & Destructor Documentation

◆ CResourceNode()

CResourceNode::CResourceNode ( _In_ CDeviceNode Node,
_In_ PCM_PARTIAL_RESOURCE_DESCRIPTOR  Descriptor,
_In_ PSP_CLASSIMAGELIST_DATA  ImageListData 
)

Definition at line 16 of file ResourceNode.cpp.

20 :
22{
23 WCHAR szDetail[200];
25 ULONG ulLength;
26
27 m_DeviceId = Node->GetDeviceId();
28 m_ClassImage = Node->GetClassImage();
29
30 ulLength = sizeof(szDescription);
33 NULL,
35 &ulLength,
36 0);
37
39 {
40 wsprintf(szDetail, L"(%s) 0x%08x (%d) %s",
41 (Descriptor->Flags & CM_RESOURCE_INTERRUPT_LATCHED) ? L"ISA" : L"PCI",
42 Descriptor->u.Interrupt.Level, Descriptor->u.Interrupt.Vector,
45 }
46 else if (Descriptor->Type == CmResourceTypePort)
47 {
48 wsprintf(szDetail, L"[%08lx - %08lx] %s",
49 Descriptor->u.Port.Start.LowPart, Descriptor->u.Port.Start.LowPart + Descriptor->u.Port.Length - 1,
52 }
53 else if (Descriptor->Type == CmResourceTypeMemory)
54 {
55 wsprintf(szDetail, L"[%08I64x - %08I64x] %s",
56 Descriptor->u.Memory.Start.QuadPart, Descriptor->u.Memory.Start.QuadPart + Descriptor->u.Memory.Length - 1,
59 }
60 else if (Descriptor->Type == CmResourceTypeDma)
61 {
62 wsprintf(szDetail, L"%08ld %s", Descriptor->u.Dma.Channel, szDescription);
64 }
65}
@ ResourceNode
Definition: Node.h:10
#define CM_DRP_DEVICEDESC
Definition: cfgmgr32.h:676
CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyW(_In_ DEVINST dnDevInst, _In_ ULONG ulProperty, _Out_opt_ PULONG pulRegDataType, _Out_writes_bytes_opt_(*pulLength) PVOID Buffer, _Inout_ PULONG pulLength, _In_ ULONG ulFlags)
Definition: cfgmgr.c:3471
Definition: Node.h:15
LPWSTR m_DeviceId
Definition: Node.h:19
INT m_ClassImage
Definition: Node.h:22
WCHAR m_DisplayName[DISPLAY_NAME_LEN]
Definition: Node.h:20
#define NULL
Definition: types.h:112
static const WCHAR szDescription[]
Definition: provider.c:55
#define MAX_PATH
Definition: compat.h:34
#define L(x)
Definition: resources.c:13
SP_CLASSIMAGELIST_DATA ImageListData
Definition: hdwwiz.c:34
#define CmResourceTypeMemory
Definition: restypes.h:106
#define CmResourceTypeDma
Definition: restypes.h:107
#define CmResourceTypePort
Definition: restypes.h:104
#define CM_RESOURCE_INTERRUPT_LATCHED
Definition: restypes.h:117
#define CmResourceTypeInterrupt
Definition: restypes.h:105
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
uint32_t ULONG
Definition: typedefs.h:59
Definition: dlist.c:348
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342
#define wsprintf
Definition: winuser.h:5976
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ ~CResourceNode()

CResourceNode::~CResourceNode ( )

Definition at line 68 of file ResourceNode.cpp.

69{
70}

Member Function Documentation

◆ SetupNode()

bool CResourceNode::SetupNode ( )
virtual

Implements CNode.

Definition at line 74 of file ResourceNode.cpp.

75{
76 return true;
77}

The documentation for this class was generated from the following files: