ReactOS 0.4.16-dev-1521-gb8f1da6
DeviceView.h
Go to the documentation of this file.
1#pragma once
2#include "DeviceNode.h"
3#include "ClassNode.h"
4#include "RootNode.h"
5#include "ResourceNode.h"
6#include "ResourceTypeNode.h"
7
9{
14};
15
16
18{
19
27
29 CAtlList<CClassNode *> m_ClassNodeList;
30 CAtlList<CDeviceNode *> m_DeviceNodeList;
32
33public:
36 );
37
38 ~CDeviceView(void);
39
40 bool Initialize();
41 bool Uninitialize();
42
44 _In_ int x,
45 _In_ int y,
46 _In_ int cx,
47 _In_ int cy
48 );
49
51 _In_ LPNMHDR NmHdr
52 );
53
55 _In_ LPNMHDR NmHdr
56 );
57
60 );
61
64 );
65
68 _In_ bool ScanForChanges,
69 _In_ bool UpdateView
70 );
71
73 VOID SetFocus();
74
75 VOID SetHiddenDevices(_In_ bool ShowHidden)
76 {
77 m_ShowHidden = ShowHidden;
78 }
79
81
83 _In_ HMENU OwnerMenu,
84 _In_ bool MainMenu
85 );
86
88 );
89
92
93private:
94 bool AddRootDevice();
95
96 bool RefreshDeviceList();
97
98 static unsigned int __stdcall RefreshThread(
99 void *Param
100 );
101
103 );
105 );
107 );
108
109 bool RecurseResources(
111 _In_ HTREEITEM hMemoryTreeItem,
112 _In_ HTREEITEM hPortTreeItem,
113 _In_ HTREEITEM hDmaTreeItem,
114 _In_ HTREEITEM hIrqTreeItem
115 );
116
117 bool GetNextClass(
118 _In_ ULONG ClassIndex,
119 _Out_ LPGUID ClassGuid,
120 _Out_ HDEVINFO *hDevInfo
121 );
122
125 _In_ HTREEITEM hParentTreeItem
126 );
127
129 _In_ bool Enable,
130 _Out_ bool &NeedsReboot
131 );
132
134 _Out_ bool &NeedsReboot
135 );
136
138 );
139
141 );
142
143 bool GetChildDevice(
144 _In_ DEVINST ParentDevInst,
145 _Out_ PDEVINST DevInst
146 );
147
148 bool GetSiblingDevice(
149 _In_ DEVINST PrevDevice,
150 _Out_ PDEVINST DevInst
151 );
152
154 _In_opt_ HTREEITEM hParent,
156 );
157
159 _In_ HMENU OwnerMenu,
160 _In_ CNode *Node,
161 _In_ bool MainMenu
162 );
163
165 _In_ HTREEITEM hParentItem,
167 );
168
169 void SelectNode(
171 );
172
173 void EmptyDeviceView(
174 );
175
176 CNode* GetNode(
177 _In_ LPTV_ITEMW TvItem
178 );
179
181 _In_ LPGUID ClassGuid
182 );
185 );
186 void EmptyLists(
187 );
188};
189
ViewType
Definition: DeviceView.h:9
@ DevicesByConnection
Definition: DeviceView.h:11
@ ResourcesByType
Definition: DeviceView.h:12
@ ResourcesByConnection
Definition: DeviceView.h:13
@ DevicesByType
Definition: DeviceView.h:10
Type
Definition: Type.h:7
DEVNODE * PDEVINST
Definition: cfgmgr32.h:77
DWORD DEVINST
Definition: cfgmgr32.h:76
~CDeviceView(void)
Definition: DeviceView.cpp:49
HWND m_hMainWnd
Definition: DeviceView.h:20
CAtlList< CClassNode * > m_ClassNodeList
Definition: DeviceView.h:29
bool RunAddHardwareWizard()
Definition: DeviceView.cpp:931
void EmptyLists()
bool RecurseResources(_In_ DEVINST ParentDevice, _In_ HTREEITEM hMemoryTreeItem, _In_ HTREEITEM hPortTreeItem, _In_ HTREEITEM hDmaTreeItem, _In_ HTREEITEM hIrqTreeItem)
Definition: DeviceView.cpp:636
VOID SetHiddenDevices(_In_ bool ShowHidden)
Definition: DeviceView.h:75
void BuildActionMenuForNode(_In_ HMENU OwnerMenu, _In_ CNode *Node, _In_ bool MainMenu)
CNode * GetSelectedNode()
Definition: DeviceView.cpp:341
LRESULT OnSize(_In_ int x, _In_ int y, _In_ int cx, _In_ int cy)
Definition: DeviceView.cpp:108
HWND m_hTreeView
Definition: DeviceView.h:21
bool RecurseChildDevices(_In_ DEVINST ParentDevice, _In_ HTREEITEM hParentTreeItem)
Definition: DeviceView.cpp:765
VOID DisplayPropertySheet()
Definition: DeviceView.cpp:305
HMENU m_hMenu
Definition: DeviceView.h:23
bool EnableSelectedDevice(_In_ bool Enable, _Out_ bool &NeedsReboot)
Definition: DeviceView.cpp:861
HTREEITEM RecurseFindDevice(_In_ HTREEITEM hParentItem, _In_ CNode *Node)
VOID SetFocus()
Definition: DeviceView.cpp:319
CNode * GetNode(_In_ LPTV_ITEMW TvItem)
HWND m_hPropertyDialog
Definition: DeviceView.h:22
bool SelDeviceIsStarted()
bool RefreshDeviceList()
CRootNode * m_RootNode
Definition: DeviceView.h:28
bool ListDevicesByType()
Definition: DeviceView.cpp:445
bool GetChildDevice(_In_ DEVINST ParentDevInst, _Out_ PDEVINST DevInst)
Definition: DeviceView.cpp:955
void EmptyDeviceView()
bool UninstallSelectedDevice()
Definition: DeviceView.cpp:908
void SelectNode(_In_ CNode *Node)
ViewType GetCurrentView()
Definition: DeviceView.h:80
bool AddRootDevice()
Definition: DeviceView.cpp:353
bool GetNextClass(_In_ ULONG ClassIndex, _Out_ LPGUID ClassGuid, _Out_ HDEVINFO *hDevInfo)
Definition: DeviceView.cpp:360
CDeviceNode * GetDeviceNode(_In_ DEVINST Device)
bool ListResourcesByType()
Definition: DeviceView.cpp:591
HTREEITEM m_hTreeRoot
Definition: DeviceView.h:25
CAtlList< CDeviceNode * > m_DeviceNodeList
Definition: DeviceView.h:30
HTREEITEM InsertIntoTreeView(_In_opt_ HTREEITEM hParent, _In_ CNode *Node)
Definition: DeviceView.cpp:981
bool GetSiblingDevice(_In_ DEVINST PrevDevice, _Out_ PDEVINST DevInst)
Definition: DeviceView.cpp:968
ViewType m_ViewType
Definition: DeviceView.h:24
static unsigned int __stdcall RefreshThread(void *Param)
Definition: DeviceView.cpp:384
CClassNode * GetClassNode(_In_ LPGUID ClassGuid)
bool UpdateSelectedDevice(_Out_ bool &NeedsReboot)
Definition: DeviceView.cpp:889
bool Uninitialize()
Definition: DeviceView.cpp:94
LRESULT OnAction(UINT Action)
Definition: DeviceView.cpp:243
SP_CLASSIMAGELIST_DATA m_ImageListData
Definition: DeviceView.h:31
LRESULT OnRightClick(_In_ LPNMHDR NmHdr)
Definition: DeviceView.cpp:149
bool Initialize()
Definition: DeviceView.cpp:54
bool SelDeviceIsInstalled()
bool CreateActionMenu(_In_ HMENU OwnerMenu, _In_ bool MainMenu)
Definition: DeviceView.cpp:325
LRESULT OnContextMenu(_In_ LPARAM lParam)
Definition: DeviceView.cpp:169
bool m_ShowHidden
Definition: DeviceView.h:26
LRESULT OnDoubleClick(_In_ LPNMHDR NmHdr)
Definition: DeviceView.cpp:128
bool ListDevicesByConnection()
Definition: DeviceView.cpp:577
Definition: Node.h:15
LPARAM lParam
Definition: combotst.c:139
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
void Refresh(void)
Definition: magnifier.c:317
HWND hMainWnd
Definition: magnifier.c:32
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned int UINT
Definition: ndis.h:50
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define LPTV_ITEMW
Definition: commctrl.h:3300
static void UpdateView(TreeListData *pData)
Definition: treelist.c:1636
#define __stdcall
Definition: typedefs.h:25
uint32_t ULONG
Definition: typedefs.h:59
Definition: dlist.c:348
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510
_Must_inspect_result_ _In_ WDFDEVICE ParentDevice
Definition: wdfpdo.h:220
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209