ReactOS  0.4.13-dev-698-g77671f0
CRootNode Class Reference

#include <RootNode.h>

Inheritance diagram for CRootNode:
Collaboration diagram for CRootNode:

Public Member Functions

 CRootNode (_In_ PSP_CLASSIMAGELIST_DATA ImageListData)
 
 ~CRootNode ()
 
virtual bool SetupNode ()
 
DEVINST GetDeviceInst ()
 
- Public Member Functions inherited from CNode
 CNode (_In_ NodeType Type, _In_ PSP_CLASSIMAGELIST_DATA ImageListData)
 
 CNode (_In_ const CNode &Node)
 
virtual ~CNode ()
 
NodeType GetNodeType ()
 
LPGUID GetClassGuid ()
 
LPWSTR GetDisplayName ()
 
INT GetClassImage ()
 
LPWSTR GetDeviceId ()
 
bool HasProperties ()
 

Private Attributes

DEVINST m_DevInst
 

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 4 of file RootNode.h.

Constructor & Destructor Documentation

◆ CRootNode()

CRootNode::CRootNode ( _In_ PSP_CLASSIMAGELIST_DATA  ImageListData)

Definition at line 15 of file RootNode.cpp.

15  :
17 {
18 }
CNode(_In_ NodeType Type, _In_ PSP_CLASSIMAGELIST_DATA ImageListData)
Definition: Node.cpp:17
SP_CLASSIMAGELIST_DATA ImageListData
Definition: hdwwiz.c:34
PCONFIGURATION_COMPONENT_DATA RootNode
Definition: macharm.c:19

◆ ~CRootNode()

CRootNode::~CRootNode ( )

Definition at line 21 of file RootNode.cpp.

22 {
23 }

Member Function Documentation

◆ GetDeviceInst()

DEVINST CRootNode::GetDeviceInst ( )
inline

Definition at line 15 of file RootNode.h.

15 { return m_DevInst; }
DEVINST m_DevInst
Definition: RootNode.h:7

Referenced by CDeviceView::ListDevicesByConnection().

◆ SetupNode()

bool CRootNode::SetupNode ( )
virtual

Implements CNode.

Definition at line 27 of file RootNode.cpp.

28 {
29 
30  // Load the bitmap we'll be using as the root image
31  HBITMAP hRootImage;
32  hRootImage = LoadBitmapW(g_hThisInstance,
34  if (hRootImage == NULL)
35  return false;
36 
37  // Add this bitmap to the device image list. This is a bit hacky, but it's safe
39  hRootImage,
40  NULL);
41  DeleteObject(hRootImage);
42 
43 
44  // Get the root instance
45  CONFIGRET cr;
47  NULL,
49  if (cr != CR_SUCCESS)
50  {
51  return false;
52  }
53 
54  // The root name is the computer name
57 
58  return true;
59 }
INT WINAPI ImageList_Add(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
Definition: imagelist.c:445
#define IDB_ROOT_IMAGE
Definition: resource.h:8
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HINSTANCE g_hThisInstance
Definition: MainWindow.cpp:26
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
Definition: compname.c:440
DEVINST m_DevInst
Definition: RootNode.h:7
INT m_ClassImage
Definition: Node.h:20
#define CR_SUCCESS
Definition: cfgmgr32.h:842
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
CONFIGRET WINAPI CM_Locate_DevNodeW(_Out_ PDEVINST pdnDevInst, _In_opt_ DEVINSTID_W pDeviceID, _In_ ULONG ulFlags)
Definition: cfgmgr.c:5776
PSP_CLASSIMAGELIST_DATA m_ImageListData
Definition: Node.h:16
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2132
WCHAR m_DisplayName[DISPLAY_NAME_LEN]
Definition: Node.h:18
RETURN_TYPE CONFIGRET
Definition: cfgmgr32.h:74
static HBITMAP
Definition: button.c:44
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define CM_LOCATE_DEVNODE_NORMAL
Definition: cfgmgr32.h:760
#define DISPLAY_NAME_LEN
Definition: hotplug.cpp:16

Referenced by CDeviceView::Initialize(), and CDeviceView::RefreshDeviceList().

Member Data Documentation

◆ m_DevInst

DEVINST CRootNode::m_DevInst
private

Definition at line 7 of file RootNode.h.

Referenced by GetDeviceInst(), and SetupNode().


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