Tal como está no funciona y no sé para un adaptador de cámaras pero acabo de probar con una memoria usb y funciona con el siguiente cambio en la unidad CdChange:
Código Delphi
[-]
procedure TCdChange.WndProc(var Msg: TMessage);
var
Drive: Char;
begin
if Msg.Msg = WM_DEVICECHANGE then
with TWMDeviceChange(Msg) do
if
((Event = DBT_DEVICEARRIVAL) or (Event = DBT_DEVICEREMOVECOMPLETE)) and
(Header.DeviceType = DBT_DEVTYP_VOLUME)
then
begin
Drive := GetDriveFromMask(PDevBroadcastVolume(Header).UnitMask);
case Event of
DBT_DEVICEARRIVAL:
if Assigned(FOnCdInserted) then FOnCdInserted(Self, Drive);
DBT_DEVICEREMOVECOMPLETE:
if Assigned(FOnCdRemoved) then FOnCdRemoved(Self, Drive);
end;
end;
end;
es dicer, omitiendo la verificación de PDevBroadcastVolume(Header).Flags.
// Saludos