GenGetDeviceName


Function

Get the device name.

Format

Ret = GenGetDeviceName ( AppId , DeviceName)

Parameters

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

Specify Application ID retrieved by GenOpenApplication.

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

Return the device name.

Return Value

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

Definition

Return Value

Description

GEN_ERR_SUCCESS

0

Normal completed

GEN_ERR_DEVICENAME

10007

A device name isn't stored in DeviceName.

The others (See also: Error Code List)

Remarks

C-WaveformGenerator may use the current device until you select the other device or you terminate C-WaveformGenerator.
This function can be executed even if the device is in operation.

Example

Get the selected device name.

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);

 

See Also

GenSetDeviceName