SK_GetErrorStr()

Converts a return value error code into a string

Applies to:

Win32, Win64

Syntax-VB:

Declare Sub SK_GetErrorStr(ByVal number As Long, ByVal buffer As String)

Syntax-C:

VOID SK_GetErrorStr(LONG number, LPSTR buffer)

Arguments:

<number> is the number that was returned from a function

<buffer> is the buffer to place the error message

Returns:

VOID - nothing

Description:

This function is used for debugging and error message display. When a system function returns a condition other than SWKERR_NONE [0], this function can be used to retrieve an error message for printing purposes.

Note that there are two types of return codes. An error code less than 100 means that the function was not able to perform its intended action. An error code of 100 or higher is a result being returned from the web application. This means that the SOLO server responded properly and the data was sent; however, the SOLO server can respond with its own success / failure status.

Note that <buffer> must be initialized to a length of at least 50 characters or spaces before calling this function.

The following table is an exhaustive list of all of the possible error codes that may be returned from the Automation Client library.

NUMBER

DEFINE

0

SWKERR_NONE

 

Unlike the error codes (reference pp_errorstr), 0 defines a Success in the Automation Client Functions. (SK_ProcEZTrig1 is the exception.)

1

SWKERR_WINSOCK_STARTUP_ERROR

 

WinSock could not be started. Make sure that the latest version of your web browser is installed properly, with all the updates.

2

SWKERR_WINSOCK_CANNOT_RESOLVE_HOST

 

WinSock could not find Server specified. Verify computer is connected to internet, and Firewall/Proxy is setup properly.

3

SWKERR_WINSOCK_CANNOT_CREATE_SOCKET

 

This is an internal problem that is normally fixed by either rebooting the computer, or installing the latest version of Internet Explorer or their preferred web browser. If you keep getting this error, then there might be a system file that has been corrupted.

4

SWKERR_WINSOCK_CANNOT_CONNECT_TO_SERVER

 

This is similar to Error #2, but instead, it can connect to the Internet, but not the server.

5

SWKERR_WINSOCK_CANNOT_SEND_DATA

 

This is an internal problem that is normally fixed by either rebooting the computer, or installing the latest version of Internet Explorer or their preferred web browser.

6

SWKERR_WINSOCK_CANNOT_READ_DATA

 

This is an internal problem that is normally fixed by either rebooting the computer, or installing the latest version of Internet Explorer or their preferred web browser.

7

SWKERR_NO_MORE_SOFTWARE_KEYS_AVAILABLE

 

The means that the "Activations Left" under the License ID is 0.

8

SWKERR_INVALID_SERVER_RESPONSE

 

Was able to connect to server, but function could not properly parse the page referenced. Please make sure you are using the correct function associated to the correct page.

9

SWKERR_CANNOT_ALLOCATE_MEMORY

 

This is an internal error, and you should contact technical support for assistance. 

10

SWKERR_WINSOCK_CANNOT_RESOLVE_PROXY

 

This is an internal error. Please contact technical support.

11

SWKERR_WININET_UNAVAILABLE

 

When specifying WinInet only flags, WinInet is unavailable on the target system. 

12

SWKERR_WININET_FUNCTION_UNAVAILABLE

 

Check to see if the syntax is correct on the function call. For more information, please contact technical support.

13

SWKERR_NO_CONNECTION

 

There is no network connection to connect to the internet.

14

SWKERR_INTERNAL_ERROR

 

This is an internal error. Please contact technical support.

15

SWKERR_WINSOCK_CONNECT_ERROR

 

Cannot connect to internet. Verify internet connection.

16

SWKERR_WINSOCK_BUFFER_OVERFLOW

 

This is an internal error. Please contact technical support.

17

SWKERR_PARTIAL_CONNECTION

 

This is an internal error. Please contact technical support.

18

SWKERR_INVALID_PROXY_LOGIN

 

Please verify that the proxy information entered by user is valid. The proxy server was valid, but the login information could not be validated.

19

SWKERR_SERVER_DOWN

 

The server is non-responsive, or the page is formatted improperly.

20

SWKERR_FILE_ERROR

 

Could not create or open the file.

21

SWKERR_FTP_FILENOTFOUND

 

File could not be found on FTP server.

22

SWKERR_CANCEL

 

The user clicked "Cancel".

23

SWKERR_ERROR_CREATING_WINDOW

 

While downloading a file, the "Download Dialog box" could not be created.

24

SWKERR_COULD_NOT_CREATE_FILE

 

The file could not be created.

25

SWKERR_ITEMNOTFOUND

 

The <item> specified is invalid, or non-existent.

26

SWKERR_INVALIDPASSWORD

 

The "password" specified could not be validated.

27

SWKERR_UPLOADFAILED

 

This is an internal error. Please contact technical support.

28

SWKERR_CONNECTION_TIMEOUT

 

No longer used.

29

SWKERR_OS_INVALID

 

The Operating System does not support this functionality.

30

SWKERR_INVALID_PARAMETERS

 

The parameter specified is invalid or out of range.

31

SWKERR_HTTP_FILENOTFOUND

 

File could not be found on HTTP server.

32

SWKERR_ENCRYPTION_FAILED

 

Failed to encrypt web service request.

33

SWKERR_SIGNING_FAILED

 

Failed to sign web service request.

34

SWKERR_DECRYPTION_FAILED

 

Failed to decrypt web service response.

35

SWKERR_VERIFICATION_FAILED

 

Failed to verify signature of web service response.

36

SWKERR_CANONICALIZATION_FAILED

 

Failed to canonicalize web service response.

37

SWKERR_WEBSERVICE_RETURNED_FAILURE

 

Call succeeded but web service returned an error.

38

SWKERR_LOG_ENTRYNOTFOUND

 

Previous usage log entry no found.

39

SWKERR_LOG_CANNOT_ERASE

 

Failed to delete usage log.

40

SWKERR_LOG_CANNOT_OPEN

 

Failed to open usage log.

41

SWKERR_CANNOT_PARSE_RESPONSE

 

Failed to parse a response.  This can be returned by SK_PrepareWebServiceResponse when it has received an unexpected or malformed response (which is typically generated by SOLO Server).

 

Example:

Dim result as Long

Dim errBuf As String * 50

 

' Send a counter posting message

result=SK_PostCounters( . . . )

If (result < 100) Then

 ' Something went wrong - display an error message

 SK_GetErrorStr result, errBuf

 MsgBox errBuf, 0, "Application Error"

End If