chrome/browser/system_monitor/portable_device_watcher_win.cc
// On success, returns true and populates |properties_to_read| with the
// property key of the object specified by the |object_id|.
On success, returns true and populates |properties_to_read| with the
property key of the object specified by the |object_id|.
On success returns true and populates |properties_to_read| with the property key of the object specified by the |object_id| .
bool PopulatePropertyKeyCollection(
    const string16& object_id,
    base::win::ScopedComPtr<IPortableDeviceKeyCollection>* properties_to_read) {
  HRESULT hr = properties_to_read->CreateInstance(
      __uuidof(PortableDeviceKeyCollection), NULL, CLSCTX_INPROC_SERVER);
  if (FAILED(hr)) {
    DPLOG(ERROR) << "Failed to create IPortableDeviceKeyCollection instance";
    return false;
  }
  REFPROPERTYKEY key = GetUniqueIdPropertyKey(object_id);
  hr = (*properties_to_read)->Add(key);
  return SUCCEEDED(hr);
}
bool PopulatePropertyKeyCollection ( const string16 & object_id , base :: win :: ScopedComPtr < IPortableDeviceKeyCollection > * properties_to_read ) { HRESULT hr = properties_to_read -> CreateInstance ( __uuidof ( PortableDeviceKeyCollection ) , NULL , CLSCTX_INPROC_SERVER ) ; if ( FAILED ( hr ) ) { DPLOG ( ERROR ) << " " ; return false ; } REFPROPERTYKEY key = GetUniqueIdPropertyKey ( object_id ) ; hr = ( * properties_to_read ) -> Add ( key ) ; return SUCCEEDED ( hr ) ; }
On success, returns true and populates |properties_to_read| with the
property key of the object specified by the |object_id|.
On success returns true and populates |properties_to_read| with the property key of the object specified by the |object_id| .