GetDeviceName


機能

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

書式

Ret = GetDeviceName (DeviceName)

引数

DeviceName [ VB.NET:String ] [ C++ : BSTR ] [ C#:ref string]

デバイス名を返します。

戻り値

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

戻り値

内容

0

正常終了

20000

デバイス名が設定可能範囲外です。

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

説明

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

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

使用例

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

VB.NET

Dim Ret As Integer

Dim DeviceName as String = ""

Ret = c_fgen.GetDeviceName(DeviceName)

 

C++

long Ret;

ICWaveformGeneratorPtr c_fgen;

BSTR DeviceName;

Ret = c_fgen->GetDeviceName (&DeviceName);

SysFreeString(DeviceName);

 

C#

int Ret;

string DeviceName = "";

Ret = c_fgen.GetDeviceName (ref DeviceName);

 

関連項目

SetDeviceName