GenGetDeviceName


機能

デバイス名を取得します。

書式

Ret = GenGetDeviceName ( AppId , DeviceName)

引数

AppId [ VB.NET: Short ] [ C++: short ] [ C#: short ] 

GenOpenApplicationで取得したアプリケーションIDを指定します。

DeviceName [ VB.NET:String ] [ C++ : char * ] [ C#:out string]

設定されているデバイス名を取得します。

戻り値

Ret [ VB.NET: Integer ] [ C++: long ] [ C#: int ]

定義

戻り値

[Dec]

内容

GEN_ERR_SUCCESS

0

正常終了

GEN_ERR_DEVICENAME

10007

登録されていないデバイス名を指定しました

その他のエラー(参照:エラーコード一覧

説明

別のデバイスを選択する、またはアプリを落とすまで、指定したデバイスを使用します。

デバイス動作中での実行が可能です。

使用例

選択されているデバイス名を取得します。

VB.NET

Dim Ret As Integer

Dim DeviceName As New StringBuilder("", 256)
Ret = GenGetDeviceName(AppId, DeviceName)

 

C++

long Ret;

char DeviceName[256];

Ret = GenGetDeviceName(AppId, DeviceName);

 

C#

int Ret;

string DeviceName;

Ret = gen.GetDeviceName(AppId, out DeviceName);

 

関連項目

GenSetDeviceName