CntGetErrorString


Function

Retrieves the error string from the error code. Supports multi-processing.

Format

Ret = CntGetErrorString ( ErrorCode , ErrorString )

Parameters

ErrorCode [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
Specify the return value of each function.

ErrorString [ VB.NET: String ] [ C, C++: char * ] [ C#: out string ] [ Python: ctypes.c_char_p ]
Specify the base address of the buffer to store the error string. The maximum length of the string is 256 characters.

Return Value

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

Definition

Value

Description

CNT_ERR_SUCCESS

0

Normality completion

CNT_ERR_DLL_BUFF_ADDRESS

10101

Invalid data buffer address.

The others: (See also: Details of Error Code)

Initial Value

None

Remarks

It's an utility function which returns the meaningful string for the error code. Please use this function in the error processing.

Example

Stores the content of error code 10000 to ErrorString.

VB.NET

Dim Ret As Integer
Dim ErrorString As New StringBuilder("", 256)
Ret = CntGetErrorString ( 10000 , ErrorString )
 

C, C++

long Ret;
char ErrorString[256];
Ret = CntGetErrorString ( 10000 , ErrorString );
 

C#

int Ret;
string ErrorString;
Ret = cnt.GetErrorString ( 10000 , out ErrorString );
 

Python

Ret = ctypes.c_long()
ErrorString = ctypes.create_string_buffer(256)
Ret.value = ccnt.CntGetErrorString ( 10000 , ErrorString )
 

See Also

None