ReactOS  0.4.13-dev-455-g28ed234
RootNode.cpp
Go to the documentation of this file.
1 /*
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>
7 *
8 */
9 
10 #include "precomp.h"
11 #include "devmgmt.h"
12 #include "RootNode.h"
13 
14 
17 {
18 }
19 
20 
22 {
23 }
24 
25 
26 bool
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
virtual bool SetupNode()
Definition: RootNode.cpp:27
Definition: Node.h:12
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:5637
CRootNode(_In_ PSP_CLASSIMAGELIST_DATA ImageListData)
Definition: RootNode.cpp:15
PSP_CLASSIMAGELIST_DATA m_ImageListData
Definition: Node.h:16
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
#define _In_
Definition: no_sal2.h:204
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
~CRootNode()
Definition: RootNode.cpp:21
SP_CLASSIMAGELIST_DATA ImageListData
Definition: hdwwiz.c:34
PCONFIGURATION_COMPONENT_DATA RootNode
Definition: macharm.c:19
#define DISPLAY_NAME_LEN
Definition: hotplug.cpp:16