2 * PROJECT: ReactOS Device Manager
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/win32/devmgr/devmgmt/RootNode.cpp
5 * PURPOSE: Root object for
6 * COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy@reactos.org>
15 CRootNode::CRootNode(_In_ PSP_CLASSIMAGELIST_DATA ImageListData
) :
16 CNode(RootNode
, ImageListData
)
21 CRootNode::~CRootNode()
27 CRootNode::SetupNode()
30 // Load the bitmap we'll be using as the root image
32 hRootImage
= LoadBitmapW(g_hThisInstance
,
33 MAKEINTRESOURCEW(IDB_ROOT_IMAGE
));
34 if (hRootImage
== NULL
)
37 // Add this bitmap to the device image list. This is a bit hacky, but it's safe
38 m_ClassImage
= ImageList_Add(m_ImageListData
->ImageList
,
41 DeleteObject(hRootImage
);
44 // Get the root instance
46 cr
= CM_Locate_DevNodeW(&m_DevInst
,
48 CM_LOCATE_DEVNODE_NORMAL
);
54 // The root name is the computer name
55 DWORD Size
= DISPLAY_NAME_LEN
;
56 GetComputerNameW(m_DisplayName
, &Size
);