Skip to content

VideoDeviceIndexFromId

function

Delphi
function VideoDeviceIndexFromId (Value: string): LongInt;
C++Builder
System::LongInt __fastcall VideoDeviceIndexFromId(System::UnicodeString Value);
C#
public int VideoDeviceIndexFromId(string Value);
VB.NET
Public Function VideoDeviceIndexFromId(Value As String) As Integer
C++/Qt
int VideoDeviceIndexFromId (wchar_t *Value);

Returns the index of a given video device in the VideoDevicesId list.

This lets you select the device by its hardware identifier rather than its manufacturer name.

E.g.:

VideoGrabber1.VideoDevice := VideoDeviceIndexFromId ('devicepnpusbvid046dpid0826mi02739103c9a00002{65e8773d-8f56-11d0-a3b9-00a0c9223196}globalHD Webcam C525');