mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:35:43 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
59
dll/win32/devmgr/devmgmt/RootNode.cpp
Normal file
59
dll/win32/devmgr/devmgmt/RootNode.cpp
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Device Manager
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: dll/win32/devmgr/devmgmt/RootNode.cpp
|
||||
* PURPOSE: Root object for
|
||||
* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy@reactos.org>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#include "devmgmt.h"
|
||||
#include "RootNode.h"
|
||||
|
||||
|
||||
CRootNode::CRootNode(_In_ PSP_CLASSIMAGELIST_DATA ImageListData) :
|
||||
CNode(RootNode, ImageListData)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CRootNode::~CRootNode()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
CRootNode::SetupNode()
|
||||
{
|
||||
|
||||
// Load the bitmap we'll be using as the root image
|
||||
HBITMAP hRootImage;
|
||||
hRootImage = LoadBitmapW(g_hThisInstance,
|
||||
MAKEINTRESOURCEW(IDB_ROOT_IMAGE));
|
||||
if (hRootImage == NULL)
|
||||
return false;
|
||||
|
||||
// Add this bitmap to the device image list. This is a bit hacky, but it's safe
|
||||
m_ClassImage = ImageList_Add(m_ImageListData->ImageList,
|
||||
hRootImage,
|
||||
NULL);
|
||||
DeleteObject(hRootImage);
|
||||
|
||||
|
||||
// Get the root instance
|
||||
CONFIGRET cr;
|
||||
cr = CM_Locate_DevNodeW(&m_DevInst,
|
||||
NULL,
|
||||
CM_LOCATE_DEVNODE_NORMAL);
|
||||
if (cr != CR_SUCCESS)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// The root name is the computer name
|
||||
DWORD Size = DISPLAY_NAME_LEN;
|
||||
GetComputerNameW(m_DisplayName, &Size);
|
||||
|
||||
return true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue