code: def get_device_path(h_info, interface_data, ptr_info_data = None):
      Returns Hardware device path
      Parameters:
          h_info,         interface set info handler
          interface_data, device interface enumeration data
          ptr_info_data,  pointer to SP_DEVINFO_DATA() instance to receive details
      """
      required_size = c_ulong(0)
  
      dev_inter_detail_data         = SP_DEVICE_INTERFACE_DETAIL_DATA()
      dev_inter_detail_data.cb_size = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA)
  
      # get actual storage requirement
      SetupDiGetDeviceInterfaceDetail(h_info, byref(interface_data),
              None, 0, byref(required_size),
              None)
      ctypes.resize(dev_inter_detail_data, required_size.value)
  
      # read value
      SetupDiGetDeviceInterfaceDetail(h_info, byref(interface_data),
              byref(dev_inter_detail_data), required_size, None,
              ptr_info_data)
  
      # extract string only
      return dev_inter_detail_data.get_string()
docs: Returns Hardware device path
      Parameters:
          h_info,         interface set info handler
          interface_data, device interface enumeration data
          ptr_info_data,  pointer to SP_DEVINFO_DATA() instance to receive details