chrome/browser/system_monitor/portable_device_watcher_win.cc
// Registers |hwnd| to receive portable device notification details. On success,
// returns the device notifications handle else returns NULL.
Registers |hwnd| to receive portable device notification details. On success,
returns the device notifications handle else returns NULL.
Registers |hwnd| to receive portable device notification details . On success returns the device notifications handle else returns NULL .
HDEVNOTIFY RegisterPortableDeviceNotification(HWND hwnd) {
  GUID dev_interface_guid = GUID_NULL;
  HRESULT hr = CLSIDFromString(kWPDDevInterfaceGUID, &dev_interface_guid);
  if (FAILED(hr))
    return NULL;
  DEV_BROADCAST_DEVICEINTERFACE db = {
      sizeof(DEV_BROADCAST_DEVICEINTERFACE),
      DBT_DEVTYP_DEVICEINTERFACE,
      0,
      dev_interface_guid
  };
  return RegisterDeviceNotification(hwnd, &db, DEVICE_NOTIFY_WINDOW_HANDLE);
}
HDEVNOTIFY RegisterPortableDeviceNotification ( HWND hwnd ) { GUID dev_interface_guid = GUID_NULL ; HRESULT hr = CLSIDFromString ( kWPDDevInterfaceGUID , & dev_interface_guid ) ; if ( FAILED ( hr ) ) return NULL ; DEV_BROADCAST_DEVICEINTERFACE db = { sizeof ( DEV_BROADCAST_DEVICEINTERFACE ) , DBT_DEVTYP_DEVICEINTERFACE , 0 , dev_interface_guid } ; return RegisterDeviceNotification ( hwnd , & db , DEVICE_NOTIFY_WINDOW_HANDLE ) ; }
Registers |hwnd| to receive portable device notification details.
Registers |hwnd| to receive portable device notification details .