Function
Converts error code content to string.
Format
Ret = AioGetErrorString ( ErrorCode , ErrorString )
Parameter
ErrorCode [VB.NET:Integer C,C++:long C#:int]
Specifies error code.
ErrorString [VB.NET:StringBuilder C,C++:char * C#:StringBuilder]
Specifies the pointer to the buffer for storing string.
Make sure that the size of buffer is 256 bytes at least.
Return Value
Ret [VB.NET:Integer C,C++:long C#:int]
Define |
Value |
Description |
AIO_ERR_SUCCESS |
0 |
Normality completion |
AIO_ERR_PTR_ERR_STR |
10180 |
Pointer to ErrorString is NULL. |
See also: Error Code Details
Remark
It is
a utility function that returns a meaningful string from the error code.
Please use it for error handling.
Make sure that the size of buffer is 256 bytes at least.
Example for VB.NET:
Dim ErrorString As New System.Text.StringBuilder("", 256)
Example for C,C++:
char ErrorString[ 256];
Example for C#:
StringBuilder ErrorString = new StringBuilder(256);
Example
Stores the content of error code 10000 in ErrorString.
VB.NET Ret = AioGetErrorString ( 10000 , ErrorString )
C,C++ Ret = AioGetErrorString ( 10000 , ErrorString );
C# Ret = AIO.ccapaio.AioGetErrorString ( 10000 , ErrorString );
The string "The device name which wasn't registered by a device manager was specified." is stored in ErrorString.
See Also
None