AioInit

Function

Retrieves the device ID, then the device can be used.

To access a device, you need to perform this function in advance.

 

Format

Ret = AioInit ( DeviceName , Id)

 

Parameter

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

Specifies the device name set by setting utility.

 

Id [VB.NET:Short C,C++:short * C#:ref short]

Specifies address of the variable that receives the ID.

The sequent functions can use the value stored in this variable to access the device.

 

Return Value

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

Define

Value

Description

AIO_ERR_SUCCESS

0

Normality completion

AIO_ERR_INI_MEMORY

3

Failed in the allocation of the memory.

AIO_ERR_INI_REGISTRY

4

Failed in the access of setting file.

AIO_ERR_DLL_DEVICE_NAME

10000

The device name which wasn't registered by setting file was specified.

AIO_ERR_ACCESS_RIGHT

28003

Access rights error.

AIO_ERR_COMPOSITION

28005

Device composition error. IO assist server must be used if the setting except Group ID=8.

AIO_ERR_DLL_CREATE_FILE

10003

Failed in the retrieval of the handle.

AIO_ERR_NULL_DEVICE

10100

A device name isn't stored in DeviceName.

AIO_ERR_PTR_ID

10101

Pointer to Id is NULL.

 

See also: Error Code Details

 

Remark

Retrieves the device ID, then the device can be accessed.

The sequent functions use this device ID to access the device.

When access to plural devices, please prepare plural variables for storing IDs.

After AioInit function is completed normally, every function can be used until AioExit function is performed.

 

Example

Performs initialization by device name "AIO000".

VB.NET   Ret = AioInit ( "AIO000" , Id )

C,C++     Ret = AioInit ( "AIO000" , &Id );

C#          Ret = AIO.ccapaio.AioInit( "AIO000", ref Id );

 

See Also

AioExit