[DEVMGR]
[reactos.git] / reactos / dll / win32 / devmgr / devmgmt / Node.cpp
1 /*
2 * PROJECT: ReactOS Device Manager
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/win32/devmgr/devmgr/node.cpp
5 * PURPOSE: Object for each device in the tree
6 * COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy@reactos.org>
7 *
8 */
9
10 #include "stdafx.h"
11 #include "devmgmt.h"
12 #include "Node.h"
13
14
15 /* PUBLIC METHODS *******************************************/
16
17 CNode::CNode(_In_ PSP_CLASSIMAGELIST_DATA ImageListData) :
18 m_ImageListData(ImageListData),
19 m_DeviceId(NULL),
20 m_ClassImage(0)
21 {
22 m_DisplayName[0] = UNICODE_NULL;
23 }
24
25 CNode::~CNode()
26 {
27 Cleanup();
28 }
29
30
31 /* PRIVATE METHODS ******************************************/
32
33
34 void
35 CNode::Cleanup()
36 {
37 if (m_DeviceId)
38 {
39 HeapFree(GetProcessHeap(), 0, m_DeviceId);
40 m_DeviceId = NULL;
41 }
42 }