ScnLib_GetWebcamDevice()

ScnLib_GetWebcamDeviceA/W()

标准版专业版超级版至尊版
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';
  • 描述
    根据索引获取摄像头设备的名称和ID。

  • 参数
    • Index [in]
      摄像头设备索引,范围从0到设备数量-1。
    • Device [out]
      分配用于接收摄像头设备名称的字符串缓冲区。确保缓冲区容量超过260个字符。
    • DeviceID [out]
      分配用于接收摄像头设备ID的字符串缓冲区。确保缓冲区容量超过260个字符。
  • 返回值
    如果成功获取摄像头设备的名称和ID,返回值为TRUE。否则,返回值为FALSE。

  • 备注
    调用此函数来根据索引获取摄像头设备的名称和ID。如果Index大于或等于0且小于设备总数,则DeviceDeviceID参数将得到相应的摄像头设备的名称和ID,并且函数将返回TRUE。否则,DeviceDeviceID都将得到空字符串,并且函数将返回FALSE。要获取当前连接到系统的摄像头设备数量,请调用ScnLib_GetWebcamDeviceCount()

  • 参见
    ScnLib_GetWebcamDeviceCount()
    ScnLib_SelectWebcamDevice()
    ScnLib_GetSelectedWebcamDevice()

下载 SDK API 总览