By using function AioGetErrorString,
it is possible to convert error code to a character string for all functions.
The character string used by function AioGetErrorString is 256 bytes at
most.
Dim Ret As Integer
Dim ErrorRet As Integer
Dim Id As Short
Dim ErrorString As New StringBuilder("", 256)
Ret = AioInit( "AIO000" , Id )
ErrorRet = DioGetErrorString( Ret , ErrorString )
System.Diagnostics.Debug.WriteLine( "AioInit: " & ErrorString
)
Ret = AioExit( Id )
ErrorRet = DioGetErrorString( Ret , ErrorString )
System.Diagnostics.Debug.WriteLine( "AioExit: " & ErrorString
)
int Ret;
int ErrorRet;
short Id;
string ErrorString;
Ret = aio.Init( "AIO000", out Id );
ErrorRet = aio.GetErrorString( Ret , ErrorString );
System.Diagnostics.Debug.WriteLine( "AioInit: " + ErrorString
);
Ret = aio.Exit( Id );
ErrorRet = aio.GetErrorString( Ret , ErrorString );
System.Diagnostics.Debug.WriteLine( "AioExit: " + ErrorString
);
long Ret;
long ErrorRet;
short Id;
char ErrorString[256];
Ret = AioInit( "AIO000" , &Id );
ErrorRet = DioGetErrorString( Ret , ErrorString );
printf("AioInit : %s", ErrorString );
Ret = AioExit( Id );
ErrorRet = DioGetErrorString( Ret , ErrorString );
printf("AioExit : %s", ErrorString );
Ret = ctypes.c_long()
ErrorRet = ctypes.c_long()
Id = ctypes.c_short()
ErrorString = ctypes.create_string_buffer(256)
Ret.value = caio.AioInit ( b"AIO000" , ctypes.byref(Id) )
ErrorRet.value = caio.AioGetErrorString( Ret, ErrorString )
print( f"AioInit : {ErrorString.value.decode('sjis')}" )
Ret.value = caio.AioExit ( Id )
ErrorRet.value = caio.AioGetErrorString( Ret, ErrorString )
print( f"AioExit : {ErrorString.value.decode('sjis')}" )