OnDeviceArrivalOrRemoval
property OnDeviceArrivalOrRemoval: TOnDeviceArrivalOrRemoval read FOnDeviceArrivalOrRemoval write Set_OnDeviceArrivalOrRemoval;
__property TOnDeviceArrivalOrRemoval OnDeviceArrivalOrRemoval = {read=FOnDeviceArrivalOrRemoval, write=Set_OnDeviceArrivalOrRemoval};
typedef void __fastcall (__closure *TOnDeviceArrivalOrRemoval)(System::TObject* Sender, bool IsDeviceArrival, bool IsVideoDevice, System::UnicodeString DeviceName, System::LongInt DeviceIndex);
public event OnDeviceArrivalOrRemovalEventHandler OnDeviceArrivalOrRemoval;
public delegate void OnDeviceArrivalOrRemovalEventHandler(object sender, TOnDeviceArrivalOrRemovalEventArgs e);
Public Event OnDeviceArrivalOrRemoval As OnDeviceArrivalOrRemovalEventHandler
Public Delegate Sub OnDeviceArrivalOrRemovalEventHandler(sender As Object, e As TOnDeviceArrivalOrRemovalEventArgs)
void SetOnDeviceArrivalOrRemoval (TOnDeviceArrivalOrRemovalCb OnDeviceArrivalOrRemovalCb);
typedef void CALLBACK TOnDeviceArrivalOrRemovalCb (void *Object, void *Sender, BOOL IsDeviceArrival, BOOL IsVideoDevice, wchar_t *DeviceName, int DeviceIndex);
This TOnDeviceArrivalOrRemoval event occurs each time a video capture device is plugged-in or removed and returns information about this device: audio or video device, connected or disconnected, device name. The VideoDevices list or AudioDevices list is updated if a new capture device has been plugged-in. If a video capture device has been unplugged, it remains in the list. To determine if a device is connected or not, test the IsVideoDeviceConnected (DeviceIndex: LongInt): Boolean function that will return false after the device removal. When the video capture device is plugged-in again, IsVideoDeviceConnected (DeviceIndex: LongInt): Boolean returns true again. (Use IsAudioDeviceConnected to test audio devices from the AudioDevices list). Note: device arrival/removal detection works only with WDM drivers, "old" VFW capture device appear always in the device lists, even if not connected.