MCPcopy Create free account
hub / github.com/ariccio/altWinDirStat / DumpDeviceInterface

Function DumpDeviceInterface

Reference code/osImageTool/DiskInfo.cpp:377–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375 debug("}\n");
376}
377bool DumpDeviceInterface(DWORD index, HDEVINFO hDevInfo, SP_DEVICE_INTERFACE_DATA* pIfdata)
378{
379 debug("DumpDeviceInterface %d %08lx {\n", index, pIfdata->Flags);
380
381 ByteVector detail; detail.resize(sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA)+1024);
382 SP_DEVICE_INTERFACE_DETAIL_DATA *pDetail= (SP_DEVICE_INTERFACE_DETAIL_DATA*)vectorptr(detail);
383 pDetail->cbSize= (DWORD)detail.size();
384
385 DWORD cb;
386 //SP_DEVINFO_DATA devinfo;
387 if (!SetupDiGetDeviceInterfaceDetail(hDevInfo, pIfdata, (SP_DEVICE_INTERFACE_DETAIL_DATA*)vectorptr(detail), (DWORD)detail.size(), &cb, NULL))
388 {
389 error("SetupDiGetDeviceInterfaceDetail(%d)", index);
390 debug("}\n");
391 return false;
392 }
393 debug(" ifdetail: %ls\n", pDetail->DevicePath);
394
395 HKEY hkey= SetupDiOpenDeviceInterfaceRegKey(hDevInfo, pIfdata, 0, KEY_READ);
396 if (hkey!=INVALID_HANDLE_VALUE)
397 Registry::DumpKey(hkey);
398 debug("}\n");
399 return true;
400}
401
402void EnumDeviceInterfaces(HDEVINFO hDevInfo, const GUID *pGuid, SP_DEVINFO_DATA* pDevdata)
403{

Callers 1

EnumDeviceInterfacesFunction · 0.85

Calls 4

debugFunction · 0.85
errorFunction · 0.85
resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected