67#define CX_TYPECOLUMN_WIDTH 80
82 if (hpd->ClassImageListData.ImageList !=
NULL)
85 hpd->ClassImageListData.ImageList,
95 lvc.pszText = szColName;
100 sizeof(szColName) /
sizeof(szColName[0])))
111 sizeof(szColName) /
sizeof(szColName[0])))
129 if (HwDevInfo !=
NULL)
153 HWND hBtnTroubleShoot, hBtnProperties;
161 if (HwDevInfo !=
NULL)
171 sizeof(szBuffer) /
sizeof(szBuffer[0])) &&
188 sizeof(szBuffer) /
sizeof(szBuffer[0])) &&
203 sizeof(szBuffer) /
sizeof(szBuffer[0])) &&
241 ClassDevInfo = hpd->ClassDevInfo;
242 LastClassDevInfo = ClassDevInfo + hpd->NumberOfGuids;
245 while (ClassDevInfo != LastClassDevInfo)
277 ClassDevInfo = hpd->ClassDevInfo;
278 LastClassDevInfo = ClassDevInfo + hpd->NumberOfGuids;
280 while (ClassDevInfo != LastClassDevInfo)
291 DWORD MemberIndex = 0;
311 if (HwNewDevInfo !=
NULL)
317 ERR(
"Unable to allocate memory for %d SP_DEVINFO_DATA structures!\n",
329 ERR(
"Unable to allocate memory for a SP_DEVINFO_DATA structures!\n");
367 if (DevIdLen ==
wcslen(lpDeviceId) + 1)
371 DevIdLen *
sizeof(
WCHAR));
372 if (lpQueriedDeviceId !=
NULL)
381 lpQueriedDeviceId) == 0);
403 BOOL SelectedInClass;
408 ClassDevInfo = hpd->ClassDevInfo;
409 LastClassDevInfo = ClassDevInfo + hpd->NumberOfGuids;
411 while (ClassDevInfo != LastClassDevInfo)
416 LastHwDevInfo = HwDevInfo + ClassDevInfo->
ItemCount;
418 SelectedInClass = (SelectedClassGuid !=
NULL &&
420 ClassDevInfo->
Guid));
421 while (HwDevInfo != LastHwDevInfo)
431 sizeof(szBuffer) /
sizeof(szBuffer[0])))
434 li.iItem = ItemCount;
435 if ((ItemCount == 0 && lpSelectDeviceId ==
NULL) ||
444 li.pszText = szBuffer;
457 sizeof(szBuffer) /
sizeof(szBuffer[0])))
485 GUID SelectedClassGuid = {0};
491 if (HwDevInfo !=
NULL)
504 DevIdLen *
sizeof(
WCHAR));
505 if (lpDeviceId !=
NULL &&
529 (lpDeviceId !=
NULL ?
533 if (lpDeviceId !=
NULL)
552 L"DevMgrSubClassInfo");
605 HWND hControl, hButton;
609 POINT ptMargin = {0};
610 POINT ptMarginGroup = {0};
647 y =
pt.y + hpd->DevListViewHeight + ptMargin.
y;
654 hpd->DevListViewHeight,
688 ptMarginGroup.
y = ptMargin.
y * 2;
690 y += ptMarginGroup.
y;
739 cy -
y - (3 * ptMargin.
y) -
747 y =
cy - (2 * ptMargin.
y) - (rcButton.
bottom - rcButton.
top);
766 x -= (ptMargin.
x / 2) + (rcButton.
right - rcButton.
left);
871 (szWndText !=
NULL && szWndText[0] !=
L'\0'));
900 if (hpd->hWndDevList !=
NULL)
905 hpd->DevListViewHeight = rcClient.
bottom;
909 hpd->DevListViewHeight = (hpd->DevListViewHeight * 3) / 2;
936 if (hpd->ParentOldWndProc !=
NULL &&
938 L"DevMgrSubClassInfo",
1034 ClassDevInfo[uNumberOfGuids]));
1073 if (hpd->hComCtl32 !=
NULL)
INT_PTR DisplayDeviceAdvancedProperties(IN HWND hWndParent, IN LPCWSTR lpDeviceID OPTIONAL, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, IN HINSTANCE hComCtl32, IN LPCWSTR lpMachineName, IN DWORD dwFlags)
DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, OUT LPTSTR *lpTarget,...)
static HINSTANCE hDllInstance
#define ERROR_INSUFFICIENT_BUFFER
LPARAM ListViewGetSelectedItemData(IN HWND hwnd)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
BOOL GetDeviceLocationString(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, IN DEVINST dnParentDevInst OPTIONAL, OUT LPWSTR szBuffer, IN DWORD BufferSize)
BOOL GetDeviceManufacturerString(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, OUT LPWSTR szBuffer, IN DWORD BufferSize)
BOOL IsDeviceHidden(IN DEVINST DevInst, IN HMACHINE hMachine, OUT BOOL *IsHidden)
BOOL GetDeviceTypeString(IN PSP_DEVINFO_DATA DeviceInfoData, OUT LPWSTR szBuffer, IN DWORD BufferSize)
BOOL GetDeviceStatusString(IN DEVINST DevInst, IN HMACHINE hMachine, OUT LPWSTR szBuffer, IN DWORD BufferSize)
BOOL GetDeviceDescriptionString(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, OUT LPWSTR szBuffer, IN DWORD BufferSize)
HINSTANCE LoadAndInitComctl32(VOID)
#define IDC_PROPERTIESGROUP
BOOL WINAPI SetupDiDestroyClassImageList(IN PSP_CLASSIMAGELIST_DATA ClassImageListData)
BOOL WINAPI SetupDiGetClassImageIndex(IN PSP_CLASSIMAGELIST_DATA ClassImageListData, IN CONST GUID *ClassGuid, OUT PINT ImageIndex)
BOOL WINAPI SetupDiGetClassImageList(OUT PSP_CLASSIMAGELIST_DATA ClassImageListData)
BOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO devinfo, DWORD index, PSP_DEVINFO_DATA info)
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
static const WCHAR Cleanup[]
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HLOCAL NTAPI LocalFree(HLOCAL hMem)
static BOOL DisplaySelectedDeviceProperties(IN PHARDWARE_PAGE_DATA hpd)
static VOID UpdateControlStates(IN PHARDWARE_PAGE_DATA hpd)
static VOID EnableTroubleShoot(PHARDWARE_PAGE_DATA hpd, BOOL Enable)
struct _HWCLASSDEVINFO HWCLASSDEVINFO
static VOID FreeDevicesList(IN PHARDWARE_PAGE_DATA hpd)
static BOOL DeviceIdMatch(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, IN LPCWSTR lpDeviceId)
static VOID UpdateDevicesListViewControl(IN PHARDWARE_PAGE_DATA hpd)
HWND WINAPI DeviceCreateHardwarePage(IN HWND hWndParent, IN LPGUID lpGuid)
#define CX_TYPECOLUMN_WIDTH
struct _HWDEVINFO * PHWDEVINFO
struct _HARDWARE_PAGE_DATA * PHARDWARE_PAGE_DATA
static INT_PTR CALLBACK HardwareDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
struct _HWDEVINFO HWDEVINFO
static VOID InitializeDevicesList(IN PHARDWARE_PAGE_DATA hpd)
static LRESULT CALLBACK ParentSubWndProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
static VOID BuildDevicesList(IN PHARDWARE_PAGE_DATA hpd)
static VOID HardwareDlgResize(IN PHARDWARE_PAGE_DATA hpd, IN INT cx, IN INT cy)
HWND WINAPI DeviceCreateHardwarePageEx(IN HWND hWndParent, IN LPGUID lpGuids, IN UINT uNumberOfGuids, IN HWPAGE_DISPLAYMODE DisplayMode)
static VOID FillDevicesListViewControl(IN PHARDWARE_PAGE_DATA hpd, IN LPCWSTR lpSelectDeviceId OPTIONAL, IN GUID *SelectedClassGuid OPTIONAL)
struct _HARDWARE_PAGE_DATA HARDWARE_PAGE_DATA
struct _HWCLASSDEVINFO * PHWCLASSDEVINFO
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
static VIDEODISPLAYMODE DisplayMode
_Out_opt_ int _Out_opt_ int * cy
#define ListView_InsertItem(hwnd, pitem)
#define ListView_InsertColumn(hwnd, iCol, pcol)
#define ListView_SetImageList(hwnd, himl, iImageList)
#define LVS_EX_FULLROWSELECT
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
struct tagNMLISTVIEW * LPNMLISTVIEW
#define ListView_DeleteAllItems(hwnd)
#define ListView_SetItem(hwnd, pitem)
#define IsEqualGUID(rguid1, rguid2)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
struct _SP_CLASSIMAGELIST_DATA SP_CLASSIMAGELIST_DATA
#define SetupDiGetDeviceInstanceId
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
#define SetupDiGetClassDevs
struct _SP_DEVINFO_DATA SP_DEVINFO_DATA
PULONG MinorVersion OPTIONAL
SP_CLASSIMAGELIST_DATA ClassImageListData
HWCLASSDEVINFO ClassDevInfo[1]
HWPAGE_DISPLAYMODE DisplayMode
struct _HWCLASSDEVINFO * ClassDevInfo
SP_DEVINFO_DATA DevInfoData
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
DWORD WINAPI GetLastError(void)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define GetWindowTextLength
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define CreateDialogParam
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI IsWindowVisible(_In_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)
HDWP WINAPI BeginDeferWindowPos(_In_ int)