2 * PROJECT: ReactOS Device Manager
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/win32/devmgr/devmgr/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_hInstance
,
33 MAKEINTRESOURCEW(IDB_ROOT_IMAGE
));
34 if (hRootImage
== NULL
) return FALSE
;
36 // Add this bitmap to the device image list. This is a bit hacky, but it's safe
37 m_ClassImage
= ImageList_Add(m_ImageListData
->ImageList
,
40 DeleteObject(hRootImage
);
43 // Get the root instance
45 cr
= CM_Locate_DevNodeW(&m_DevInst
,
47 CM_LOCATE_DEVNODE_NORMAL
);
53 // The root name is the computer name
54 DWORD Size
= DISPLAY_NAME_LEN
;
55 if (GetComputerNameW(m_DisplayName
, &Size
))
56 _wcslwr_s(m_DisplayName
);