以获得设备能力集为例:

海康 C++

获取设备能力集。

BOOL NET_DVR_GetDeviceAbility(
  LONG     lUserID,
  DWORD    dwAbilityType,
  char     *pInBuf,
  DWORD    dwInLength,
  char     *pOutBuf,
  DWORD    dwOutLength
);

JAVA

boolean NET_DVR_GetDeviceAbility(NativeLong lUserID, int dwAbilityType, Pointer pInBuf, int dwInLength,
      Pointer pOutBuf, int dwOutLength);

dwAbilityType 这个参数不同,返回的结果也一样,有时返回时一个结构体对象,有时返回是一个String类型的XML。

这次以XML为例,主要代码如下:

Pointer pOutBuf = new Memory(10000);
    boolean flag = sdk.NET_DVR_GetDeviceAbility(lUserID, 自己填入, null, 0, pOutBuf, 10000);
    if (!flag) {
      System.out.println("获得能力集失败,错误码:" + sdk.NET_DVR_GetLastError());
    }
    System.out.println("获得能力集成功," + pOutBuf.getString(0));

相关文章:

  • 2021-08-04
  • 2021-09-03
  • 2021-08-21
  • 2021-11-10
  • 2021-11-29
  • 2021-04-11
猜你喜欢
  • 2022-02-09
  • 2022-12-23
  • 2022-03-04
  • 2022-12-23
  • 2022-01-28
  • 2021-08-01
  • 2022-01-09
相关资源
相似解决方案