ScnLib_GetWebcamDevice()

ScnLib_GetWebcamDeviceA/W()

Std EditionPro EditionMax EditionUltra Edition
C++ __declspec(dllimport) BOOL __stdcall ScnLib_GetWebcamDeviceA(int nIndex, LPSTR pszDevice, LPSTR pszDeviceID);
__declspec(dllimport) BOOL __stdcall ScnLib_GetWebcamDeviceW(int nIndex, LPWSTR pwszDevice, LPWSTR pwszDeviceID);
C# [DllImport("ScnLib.dll", CharSet = CharSet.Unicode)] public static extern bool ScnLib_GetWebcamDeviceW(int Index, StringBuilder Device, StringBuilder DeviceID);
Basic Public Declare Unicode Function ScnLib_GetWebcamDeviceW Lib "ScnLib.dll" (ByVal Index As Int32, ByVal Device As StringBuilder, ByVal DeviceID As StringBuilder) As Boolean
Delphi function ScnLib_GetWebcamDeviceA(Index: Integer; Device: PAnsiChar; DeviceID: PAnsiChar): LongBool; stdcall; external 'ScnLib.dll';
function ScnLib_GetWebcamDeviceW(Index: Integer; Device: PWideChar; DeviceID: PWideChar): LongBool; stdcall; external 'ScnLib.dll';
  • Description
    Obtain the name and ID of a webcam device based on its index.

  • Parameters
    • Index [in]
      The specified index for the webcam device, ranging from 0 to the device count - 1.
    • Device [out]
      The string buffer allocated to receive the webcam device name. Ensure that the buffer has a capacity greater than 260 characters.
    • DeviceID [out]
      The string buffer allocated to receive the webcam device ID. Ensure that the buffer has a capacity greater than 260 characters.
  • Return Value
    If the name and ID of a webcam device are successfully obtained, the return value is TRUE. Otherwise, the return value is FALSE.

  • Remarks
    Use this function to obtain the name and ID of a webcam device based on its index. If the index is greater than or equal to 0 and less than the total device count, the Device and DeviceID parameters will be assigned the corresponding webcam device's name and ID, and the function will return TRUE. Otherwise, both Device and DeviceID will be set to empty strings and the function will return FALSE. To obtain the count of webcam devices currently connected to the system, call ScnLib_GetWebcamDeviceCount().

  • See Also
    ScnLib_GetWebcamDeviceCount()
    ScnLib_SelectWebcamDevice()
    ScnLib_GetSelectedWebcamDevice()

Try the SDK for FREE SDK APIs overview