DIO2K_SetIOMode

 

This function code is used to set specific channel's DI/DO mode.This function will take effect after restart the device.

 

C/C++

int DIO2K_SetIOMode ( int hConnection,

BYTE bytChannel,

BYTE bytMode);

 

Visual Basic

Declare Function DIO2K_SetIOMode Lib "MXIO.dll" (ByVal hConnection As Long, ByVal bytChannel As Byte, ByVal bytMode As Byte) As Long

 

Arguments:

hConnection

The handle for an I/O device connection.

bytChannel

The specific channel to be set.

bytMode

A pointer that stores the specific channel's DI/DO mode. The values are :

0: INPUT DI mode

1: OUTPUT DO mode

 

Return Value:

Succeed

MXIO_OK

Fail

Refer to Return Codes.