ZmGetMaxChannels


機能

デバイスの最大チャネル数を取得します。

書式

Ret = ZmGetMaxChannels ( Id , MaxChannels )

引数

Id [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
ZmInitで取得したデバイスIDを指定します。

MaxChannels [ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short) ]
デバイスの最大チャネル数格納用の変数アドレスを指定します。

戻り値

Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]

定義

戻り値
[Dec]

内容

ZM_ERR_SUCCESS

0

正常終了

ZM_ERR_SYS_RECOVERED_FROM_STANDBY

7

スタンバイモードから復帰したため、ZmResetDevice関数を実行してください

ZM_ERR_DLL_INVALID_ID

10001

無効なIDが指定されました。

ZM_ERR_DLL_CALL_DRIVER

10002

ドライバを呼び出せません(デバイスI/Oコントロールに失敗)。

ZM_ERR_DLL_BUFF_ADDRESS

10100

データバッファアドレスが不正です。

その他のエラー(参照:エラーコード詳細

初期値

なし

説明

デバイスのチャネル数を取得します。

使用例

デバイスのチャネル数を取得します。

VB.NET

Dim Ret As Integer
Dim MaxChannels As Short
Ret = ZmGetMaxChannels ( Id , MaxChannels )
 

C, C++

long Ret;
short MaxChannels;
Ret = ZmGetMaxChannels ( Id , &MaxChannels );
 

C#

int Ret;
short MaxChannels;
Ret = zm.GetMaxChannels ( Id , out MaxChannels );
 

Python

Ret = ctypes.c_long()
MaxChannels = ctypes.c_short()
Ret.value = czm.ZmGetMaxChannels ( Id , ctypes.byref(MaxChannels) )
 

関連項目

なし