#include <commctrl.h>
#include <windows.h>
#include <commctrl.h>
-
+#if defined (__GNUC__)
+#include <winioctl.h>
+#endif
/* FIXME: should be in cfgmgr32.h */
typedef DWORD CONFIGRET;
long Size;
long rc;
+ SendMessage(hwndListView, WM_SETREDRAW, FALSE, 0);
+
ListView_DeleteAllItems(hwndListView);
while (1)
{
}
SetupDiDestroyDeviceInfoList(hDevInfo);
}
+ SendMessage(hwndListView, WM_SETREDRAW, TRUE, 0);
}
CONFIGRET GetDeviceName(DEVINST DevInst, LPTSTR Buffer, DWORD BufferLength)
_tprintf(_T("CM_Locate_DevNode() failed, cr= 0x%lx\n"), cr);
return 1;
}
-
+ SendMessage(hwndListView, WM_SETREDRAW, FALSE, 0);
cr = ListSubNodes(root, 0);
+ SendMessage(hwndListView, WM_SETREDRAW, TRUE, 0);
if (cr != CR_SUCCESS)
return 2;
return 0;
i = 0;
DeviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
+ SendMessage(hwndListView, WM_SETREDRAW, FALSE, 0);
while (TRUE)
{
if (!SetupDiEnumDeviceInterfaces(
}
}
+ SendMessage(hwndListView, WM_SETREDRAW, TRUE, 0);
SetupDiDestroyDeviceInfoList(hDevInfo);
return 0;
}
-DEFINE_GUID(GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR,
- 0x4D36E978L, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-
/*int main(void)
{
ListByClass();
ResizeListView(hWnd);
break;
case WM_DESTROY:
+ ReleaseDC(hWnd, hDC);
PostQuitMessage(0);
break;
case WM_COMMAND: