AioQueryDeviceName


Function

Retrieves the list of available devices. This function supports multi-process.

Format

Ret = AioQueryDeviceName(Index, DeviceName,  Device)

Parameters

Index [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
This parameter should be zero for the first call and then be incremented by 1 for subsequent calls.

DeviceName [ VB.NET : String ] [ C, C++ : char * ] [ C# : out StringBuilder ] [ Python : ctypes.c_char_p ]
Returns the device name. (For example: "AIO000")

Device [ VB.NET : String ] [ C, C++ : char * ] [ C# : out StringBuilder ] [ Python : ctypes.c_char_p ]
Returns the board name. (For example: "AD12-16U(PCI)EV")

Return values

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

Return values

Content

0

Normality completion

10006

Device not found
Make sure that the device is registered in device manager

10007

Pointer to DeviceName is NULL
Specify the address of variable to parameter.

10008

Pointer to Device is NULL
Specify the address of variable to parameter.

Remarks

This function can be used when you are creating a general-purpose application about the selected device to be used.
Index is incremented by 1 from 0 in order for subsequent calls until the function returns error.

Example

Retrieves the information of the device by Index=0.

VB.NET

Dim Ret As Integer
Dim DeviceName As New StringBuilder("", 256)
Dim Device As New StringBuilder("", 256)
Ret = AioQueryDeviceName ( 0 , DeviceName , Device )
 

C, C++

long Ret;
char DeviceName[256];
char Device[256];
Ret = AioQueryDeviceName ( 0 , DeviceName , Device );
 

C#

int Ret;
string DeviceName;
string Device;
Ret = aio.QueryDeviceName ( 0 , out DeviceName , out Device );
 

Python

Ret = ctypes.c_long()
DeviceName = ctypes.create_string_buffer(256)
Device = ctypes.create_string_buffer(256)
Ret.value = caio.AioQueryDeviceName ( 0 , DeviceName , Device )