#include <dwc.h>
DWCError DWC_GetLastError( int* errorCode );
DWCError DWC_GetLastErrorEx( int* errorCode, DWCErrorType* errorType );
Gets information about the last communication error. If this goes into an error status, the DWC library stops accepting most functions. In order to recover from an error status, call the DWC_ClearError
function after executing the appropriate error handling process.
The error code that should be displayed when the application generates an error is returned to the buffer indicated by the pointer to the error code storage destination. Because the error code is returned as a negative value, invert the sign to make it positive before displaying it onscreen.
However, if the error code is 0 or the error process type is DWC_ETYPE_LIGHT, these are game-specific displays, so there is no need to display the error code.
We recommend that you use the DWC_GetLastErrorEx function, which also obtains the error process type (errorType) at the same time.
errorType stores the information about the recovery process after an error occurs and the information for displaying the error code, so a fixed error process can be created for each value.
errorCode |
Pointer to the error code storage location. If the error code is not required, specify NULL. |
errorType |
Pointer to location where the error processing type is stored. If the error code is not required, specify NULL. |
Error codes relating to the GameSpy SDK (the library that uses the features of the GameSpy server) are expressed by summing the three following values:
"Sequence where an error process occurred" + "GameSpy SDK type where the error occurred" + "Detailed error information"
When the FriendsMatch Library is not used, errors associated with the GameSpy SDK will not occur.
DWC_ECODE_SEQ_LOGIN |
-60000 |
Error during login processing |
DWC_ECODE_SEQ_FRIEND |
-70000 |
Error during friend management processing |
DWC_ECODE_SEQ_MATCH |
-80000 |
Error during the matchmaking process |
DWC_ECODE_SEQ_ETC |
-90000 |
Error during processing that is not listed |
DWC_ECODE_GS_GP |
-1000 |
GameSpy GP error |
DWC_ECODE_GS_PERS |
-2000 |
GameSpy Persistent error |
DWC_ECODE_GS_STATS |
-3000 |
GameSpy Stats error |
DWC_ECODE_GS_QR2 |
-4000 |
GameSpy QR2 error |
DWC_ECODE_GS_SB |
-5000 |
GameSpy ServerBrowsing error |
DWC_ECODE_GS_NN |
-6000 |
GameSpy NatNegotiation error |
DWC_ECODE_GS_GT2 |
-7000 |
GameSpy gt2 error |
DWC_ECODE_GS_HTTP |
-8000 |
GameSpy HTTP error |
DWC_ECODE_GS_ETC |
-9000 |
Other GameSpy SDK error |
DWC_ECODE_TYPE_NETWORK |
-10 |
Network failure |
DWC_ECODE_TYPE_SERVER |
-20 |
GameSpy server failure |
DWC_ECODE_TYPE_DNS |
-30 |
DNS failure |
DWC_ECODE_TYPE_DATA |
-40 |
Received invalid data |
DWC_ECODE_TYPE_SOCKET |
-50 |
Socket communication error |
DWC_ECODE_TYPE_BIND |
-60 |
Socket bind error |
DWC_ECODE_TYPE_TIMEOUT |
-70 |
Timeout occurred |
DWC_ECODE_TYPE_PEER |
-80 |
Problem with one-on-one communication |
DWC_ECODE_TYPE_CONN_OVER |
-100 |
Exceeded number of connections |
DWC_ECODE_TYPE_STATS_AUTH |
-200 |
STATS server login error |
DWC_ECODE_TYPE_STATS_LOAD |
-210 |
STATS server data load error |
DWC_ECODE_TYPE_STATS_SAVE |
-220 |
STATS server data save error |
DWC_ECODE_TYPE_NOT_FRIEND |
-400 |
The specified partner is not a registered friend |
DWC_ECODE_TYPE_OTHER |
-410 |
The partner disconnected communications (usually occurs under server-client matchmaking) |
DWC_ECODE_TYPE_MUCH_FAILUR |
-420 |
Failed NAT negotiations for the specified number of times |
DWC_ECODE_TYPE_SC_CL_FAIL |
-430 |
The server-client matchmaking client DS failed to connect |
DWC_ECODE_TYPE_CLOSE |
-600 |
Closing connections error |
DWC_ECODE_TYPE_TRANS_HEADER |
-610 |
Error which occurred when Reliable data was received in an impossible reception state |
DWC_ECODE_TYPE_TRANS_BODY |
-620 |
Error when the reception buffer overflows |
DWC_ECODE_TYPE_AC_FATAL |
-700 |
The error group on AC during the automatic connection process In this case, the lower order digits represent a dedicated state value. |
DWC_ECODE_TYPE_OPEN_FILE |
-800 |
Failed to open GHTTP file |
DWC_ECODE_TYPE_INVALID_POST |
-810 |
Invalid GHTTP transmission |
DWC_ECODE_TYPE_REQ_INVALID |
-820 |
GHTTP file names, etc. are invalid |
DWC_ECODE_TYPE_UNSPECIFIED |
-830 |
Unspecified GHTTP error |
DWC_ECODE_TYPE_BUFF_OVER |
-840 |
GHTTP buffer overflow |
DWC_ECODE_TYPE_PARSE_URL |
-850 |
GHTTPURL analysis error |
DWC_ECODE_TYPE_BAD_RESPONSE |
-860 |
Error analyzing the response from the GHTTP server |
DWC_ECODE_TYPE_REJECTED |
-870 |
Reject requests, etc. from a GHTTP server |
DWC_ECODE_TYPE_FILE_RW |
-880 |
GHTTP local file read/write error |
DWC_ECODE_TYPE_INCOMPLETE |
-890 |
GHTTP download aborted |
DWC_ECODE_TYPE_TO_BIG |
-900 |
Download prohibited because the GHTTP file size is too large |
DWC_ECODE_TYPE_ENCRYPTION |
-910 |
GHTTP encryption error |
DWC_ECODE_TYPE_ALLOC |
-1 |
Failed to allocate memory |
DWC_ECODE_TYPE_PARAM |
-2 |
Parameter error |
DWC_ECODE_TYPE_SO_SOCKET |
-3 |
A GameSpy gt2 socket error was caused by an SO error |
DWC_ECODE_TYPE_NOT_INIT |
-4 |
The Internet connection has not been initialized |
DWC_ECODE_TYPE_DUP_INIT |
-5 |
The library has been initialized twice |
DWC_ECODE_TYPE_WM_INIT |
-6 |
Failure to initialize WM |
DWC_ECODE_TYPE_UNEXPECTED |
-9 |
An unexpected state, or an unknown GameSpy error has occurred |
Error codes relating to the Download features are expressed by summing the three following values:
DWC_ECODE_SEQ_ADDINS(-30000) + DWC_ECODE_FUNC_ND(-1000) + (the error details)
DWC_ECODE_TYPE_ND_ALLOC |
-1 |
Failed to allocate memory |
DWC_ECODE_TYPE_ND_HTTP |
-20 |
HTTP communications failure |
DWC_ECODE_TYPE_ND_BUFFULL |
-30 |
Received data was larger than the allocated receive buffer |
DWC_ECODE_TYPE_ND_FATAL |
-9 |
Some other fatal error (not defined above) has occurred |
(Undefined) | -101 |
Illegal parameter |
(Undefined) | -102 |
Unregistered service |
(Undefined) | -103 |
Illegal token (service locator information) |
(Undefined) | -104 |
Expired token (service locator information) |
(Undefined) | -105 |
No content present |
(Undefined) | -106 |
Attribute does not match |
(Undefined) | -107 |
Expired content |
(Undefined) | -108 |
Access from an access point that is not a service target |
(Undefined) | -109 |
Cannot connect to database (problem with Download server) |
(Undefined) | -110 |
Password does not match |
These are errors codes relating to the processes of logging into to the Authentication server and getting the service locator information.
These are errors codes relating to the Internet auto-connect process.
When an error occurs, the error process type (DWCErrorType) returns a value telling when the library should be initialized.
DWC_ETYPE_NO_ERROR |
No error |
DWC_ETYPE_LIGHT |
Only a game-specific display. The error code display is not necessary. Recovery is possible by calling the DWC_ClearError function. |
DWC_ETYPE_SHOW_ERROR |
Display the error code.Recovery is possible by calling the DWC_ClearError function. |
DWC_ETYPE_SHUTDOWN_FM |
The DWC_ShutdownFriendsMatch function must be called to terminate the FriendsMatch Library. Display the error code. |
DWC_ETYPE_SHUTDOWN_GHTTP |
You must call the DWC_ShutdownGHTTP function and end the HTTP communcations (GameSpy HTTP) library. Display the error code. |
DWC_ETYPE_SHUTDOWN_ND |
You must call the DWC_NdCleanupAsync function and end the Download library. Display the error code. |
DWC_ETYPE_DISCONNECT |
Call the following library release functions, as needed. DWC_ShutdownFriendsMatch function (FriendsMatch library) DWC_ShutdownGHTTP function (HTTP communications library) DWC_NdCleanupAsync function (Download library) DWC_RnkShutdown function (general-purpose ranking library) Communication must be ended using DWC_CleanupInet or DWC_CleanupInetAsync afterwards. Display the error code. |
DWC_ETYPE_FATAL |
Since this is equivalent to a FatalError, it is necessary to prompt the user to turn power OFF. Display the error code. |
DWC_ERROR_NONE |
No error |
DWC_ERROR_DS_MEMORY_ANY |
Error related to system save data |
DWC_ERROR_AUTH_ANY |
Error related to authentication |
DWC_ERROR_AUTH_OUT_OF_SERVICE |
Service terminated |
DWC_ERROR_AUTH_STOP_SERVICE |
Service being halted temporarily |
DWC_ERROR_AC_ANY |
Error related to automatic connection |
DWC_ERROR_NETWORK |
Other network error |
DWC_ERROR_DISCONNECTED |
Disconnected |
DWC_ERROR_FATAL |
Fatal error |
DWC_ERROR_FRIENDS_SHORTAGE |
Tried to begin pair matchmaking by specifying friends without enough valid friends for the specified number. |
DWC_ERROR_NOT_FRIEND_SERVER |
With server-client matchmaking, either the friends specified in the server DS are not mutual friends or the server is down. |
DWC_ERROR_MO_SC_CONNECT_BLOCK |
The server DS has denied the connection based on the matchmaking options in server-client matchmaking. |
DWC_ERROR_SERVER_FULL |
The server-client matchmaking server DS has exceeded the maximum number of participants. |
DWC_ERROR_GHTTP_ANY |
HTTP communications (GameSpy HTTP) error |
DWC_ERROR_ND_HTTP |
Download library HTTP communications error |
DWC_ERROR_ND_ANY |
Some other error by the Download library |
DWC_ERROR_SVL_HTTP |
HTTP communications error while getting service locator information |
DWC_ERROR_SVL_ANY |
Some other error while getting service locator information |
8/02/2006 Changed the error code display conditions (From "Display All" to "OK not to display when the error code is 0")
07/24/2006 Revised some erroneous entries
07/03/2006 Inserted an explanation about when the FriendsMatch Library is not in use
06/22/2006 Added the error code -31030
06/14/2006 Changed the error code display conditions (from "OK not to display when the error is 0 to -9999" to "Display all")
06/05/2006 Integrated the function references for DWC_GetLastError and DWC_GetLastErrorEx
05/26/2006 Added error information about the Download functionality and similar features
Revision history for the DWC_GetLastError function.
12/16/2005 Revisions
07/22/2005 Initial version
Revision history for the DWC_GetLastErrorEx function
01/31/2005 Set up a link to the FriendMatch Library
12/16/2005 Revisions
11/01/2005 Initial version
CONFIDENTIAL