ReactOS 0.4.17-dev-1190-g4c812f4
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#define WM_REFRESH_COMPLETE (WM_APP + 1)
17
19{
20
28
30 CAtlList<CClassNode *> m_ClassNodeList;
31 CAtlList<CDeviceNode *> m_DeviceNodeList;
36
37public:
40 );
41
42 ~CDeviceView(void);
43
44 bool Initialize();
45 bool Uninitialize();
46
48 _In_ int x,
49 _In_ int y,
50 _In_ int cx,
51 _In_ int cy
52 );
53
55 _In_ LPNMHDR NmHdr
56 );
57
59 _In_ LPNMHDR NmHdr
60 );
61
64 );
65
68 );
69
72 _In_ bool ScanForChanges,
73 _In_ bool UpdateView
74 );
75
77
79 VOID SetFocus();
80
81 VOID SetHiddenDevices(_In_ bool ShowHidden)
82 {
83 m_ShowHidden = ShowHidden;
84 }
85
87
88 bool IsRefreshing() { return m_hRefreshThread != NULL; }
89
91 _In_ HMENU OwnerMenu,
92 _In_ bool MainMenu
93 );
94
96 );
97
100
101private:
102 bool AddRootDevice();
103
104 bool RefreshDeviceList();
105
106 static unsigned int __stdcall RefreshThread(
107 void *Param
108 );
109
111 );
113 );
115 );
116
117 bool RecurseResources(
119 _In_ HTREEITEM hMemoryTreeItem,
120 _In_ HTREEITEM hPortTreeItem,
121 _In_ HTREEITEM hDmaTreeItem,
122 _In_ HTREEITEM hIrqTreeItem
123 );
124
125 bool GetNextClass(
126 _In_ ULONG ClassIndex,
127 _Out_ LPGUID ClassGuid,
128 _Out_ HDEVINFO *hDevInfo
129 );
130
133 _In_ HTREEITEM hParentTreeItem
134 );
135
137 _In_ bool Enable,
138 _Out_ bool &NeedsReboot
139 );
140
142 _Out_ bool &NeedsReboot
143 );
144
146 );
147
149 );
150
151 bool GetChildDevice(
152 _In_ DEVINST ParentDevInst,
153 _Out_ PDEVINST DevInst
154 );
155
156 bool GetSiblingDevice(
157 _In_ DEVINST PrevDevice,
158 _Out_ PDEVINST DevInst
159 );
160
162 _In_opt_ HTREEITEM hParent,
164 );
165
167 _In_ HMENU OwnerMenu,
168 _In_ CNode *Node,
169 _In_ bool MainMenu
170 );
171
173 _In_ HTREEITEM hParentItem,
175 );
176
177 void SelectNode(
179 );
180
181 void EmptyDeviceView(
182 );
183
184 CNode* GetNode(
185 _In_ LPTV_ITEMW TvItem
186 );
187
189 _In_ LPGUID ClassGuid
190 );
193 );
194 void EmptyLists(
195 );
196};
197
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:52
HWND m_hMainWnd
Definition: DeviceView.h:21
CAtlList< CClassNode * > m_ClassNodeList
Definition: DeviceView.h:30
bool RunAddHardwareWizard()
Definition: DeviceView.cpp:967
void EmptyLists()
bool RecurseResources(_In_ DEVINST ParentDevice, _In_ HTREEITEM hMemoryTreeItem, _In_ HTREEITEM hPortTreeItem, _In_ HTREEITEM hDmaTreeItem, _In_ HTREEITEM hIrqTreeItem)
Definition: DeviceView.cpp:672
VOID SetHiddenDevices(_In_ bool ShowHidden)
Definition: DeviceView.h:81
void BuildActionMenuForNode(_In_ HMENU OwnerMenu, _In_ CNode *Node, _In_ bool MainMenu)
CNode * GetSelectedNode()
Definition: DeviceView.cpp:352
LRESULT OnSize(_In_ int x, _In_ int y, _In_ int cx, _In_ int cy)
Definition: DeviceView.cpp:111
VOID OnRefreshComplete()
Definition: DeviceView.cpp:460
HWND m_hTreeView
Definition: DeviceView.h:22
bool RecurseChildDevices(_In_ DEVINST ParentDevice, _In_ HTREEITEM hParentTreeItem)
Definition: DeviceView.cpp:801
VOID DisplayPropertySheet()
Definition: DeviceView.cpp:316
HMENU m_hMenu
Definition: DeviceView.h:24
bool EnableSelectedDevice(_In_ bool Enable, _Out_ bool &NeedsReboot)
Definition: DeviceView.cpp:897
HTREEITEM RecurseFindDevice(_In_ HTREEITEM hParentItem, _In_ CNode *Node)
VOID SetFocus()
Definition: DeviceView.cpp:330
CNode * GetNode(_In_ LPTV_ITEMW TvItem)
HWND m_hPropertyDialog
Definition: DeviceView.h:23
bool SelDeviceIsStarted()
bool IsRefreshing()
Definition: DeviceView.h:88
bool RefreshDeviceList()
bool m_RefreshDirty
Definition: DeviceView.h:34
CRootNode * m_RootNode
Definition: DeviceView.h:29
bool ListDevicesByType()
Definition: DeviceView.cpp:481
bool GetChildDevice(_In_ DEVINST ParentDevInst, _Out_ PDEVINST DevInst)
Definition: DeviceView.cpp:991
void EmptyDeviceView()
bool UninstallSelectedDevice()
Definition: DeviceView.cpp:944
void SelectNode(_In_ CNode *Node)
ViewType GetCurrentView()
Definition: DeviceView.h:86
bool AddRootDevice()
Definition: DeviceView.cpp:364
bool m_DirtyScanForChanges
Definition: DeviceView.h:35
bool GetNextClass(_In_ ULONG ClassIndex, _Out_ LPGUID ClassGuid, _Out_ HDEVINFO *hDevInfo)
Definition: DeviceView.cpp:371
CDeviceNode * GetDeviceNode(_In_ DEVINST Device)
bool ListResourcesByType()
Definition: DeviceView.cpp:627
HTREEITEM m_hTreeRoot
Definition: DeviceView.h:26
CAtlList< CDeviceNode * > m_DeviceNodeList
Definition: DeviceView.h:31
HTREEITEM InsertIntoTreeView(_In_opt_ HTREEITEM hParent, _In_ CNode *Node)
bool GetSiblingDevice(_In_ DEVINST PrevDevice, _Out_ PDEVINST DevInst)
ViewType m_ViewType
Definition: DeviceView.h:25
static unsigned int __stdcall RefreshThread(void *Param)
Definition: DeviceView.cpp:395
CClassNode * GetClassNode(_In_ LPGUID ClassGuid)
bool UpdateSelectedDevice(_Out_ bool &NeedsReboot)
Definition: DeviceView.cpp:925
bool Uninitialize()
Definition: DeviceView.cpp:97
HANDLE m_hRefreshThread
Definition: DeviceView.h:33
LRESULT OnAction(UINT Action)
Definition: DeviceView.cpp:254
SP_CLASSIMAGELIST_DATA m_ImageListData
Definition: DeviceView.h:32
LRESULT OnRightClick(_In_ LPNMHDR NmHdr)
Definition: DeviceView.cpp:152
bool Initialize()
Definition: DeviceView.cpp:57
bool SelDeviceIsInstalled()
bool CreateActionMenu(_In_ HMENU OwnerMenu, _In_ bool MainMenu)
Definition: DeviceView.cpp:336
LRESULT OnContextMenu(_In_ LPARAM lParam)
Definition: DeviceView.cpp:172
bool m_ShowHidden
Definition: DeviceView.h:27
LRESULT OnDoubleClick(_In_ LPNMHDR NmHdr)
Definition: DeviceView.cpp:131
bool ListDevicesByConnection()
Definition: DeviceView.cpp:613
Definition: Node.h:15
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define __stdcall
Definition: corecrt.h:120
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
unsigned int UINT
Definition: sysinfo.c:13
_Must_inspect_result_ _In_ PUCXHUB_DEVICE_CREATE_INFO _Out_ UCXUSBDEVICE * Device
Definition: hubucx.h:258
void Refresh(void)
Definition: magnifier.c:317
HWND hMainWnd
Definition: magnifier.c:32
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#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
uint32_t ULONG
Definition: typedefs.h:59
Definition: dlist.c:348
_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