Return Values

Errors are represented by negative values and cannot be combined. This table lists the values that can be returned by all IDirectPlay4 interface and IDirectPlayLobby3 interface methods. For a list of the error values each method can return, see the individual method descriptions.

Many of the DirectPlay samples include a GetDirectPlayErrStr function that converts HRESULT values to string names for the DirectPlay errors. Developers can copy this code into their own applications for diagnostic traces or error reports.

CLASS_E_NOAGGREGATION
A non-NULL value was passed for the pUnkOuter parameter in DirectPlayCreate, DirectPlayLobbyCreate, or IDirectPlayLobby3::Connect.
DP_OK
The request completed successfully.
DPERR_ACCESSDENIED
The session is full, or an incorrect password was supplied.
DPERR_ACTIVEPLAYERS
The requested operation cannot be performed because there are existing active players.
DPERR_ALREADYINITIALIZED
This object is already initialized.
DPERR_APPNOTSTARTED
The application has not been started yet.
DPERR_AUTHENTICATIONFAILED
The password or credentials supplied could not be authenticated.
DPERR_BUFFERTOOLARGE
The data buffer is too large to store.
DPERR_BUFFERTOOSMALL
The supplied buffer is not large enough to contain the requested data.
DPERR_BUSY
A message cannot be sent because the transmission medium is busy.
DPERR_CANCELFAILED
The message could not be canceled, possibly because it is a group message that has already been to sent to one or more members of the group.
DPERR_CANNOTCREATESERVER
The server cannot be created for the new session.
DPERR_CANTADDPLAYER
The player cannot be added to the session.
DPERR_CANTCREATEGROUP
A new group cannot be created.
DPERR_CANTCREATEPLAYER
A new player cannot be created.
DPERR_CANTCREATEPROCESS
Cannot start the application.
DPERR_CANTCREATESESSION
A new session cannot be created.
DPERR_CANTLOADCAPI
No credentials were supplied and the CryptoAPI package (CAPI) to use for cryptography services cannot be loaded.
DPERR_CANTLOADSECURITYPACKAGE
The software security package cannot be loaded.
DPERR_CANTLOADSSPI
No credentials were supplied, and the Security Support Provider Interface (SSPI) that will prompt for credentials cannot be loaded.
DPERR_CAPSNOTAVAILABLEYET
The capabilities of the DirectPlay object have not been determined yet. This error will occur if the DirectPlay object is implemented on a connectivity solution that requires polling to determine available bandwidth and latency.
DPERR_CONNECTING
The method is in the process of connecting to the network. The application should keep using the method until it returns DP_OK, indicating successful completion, or until it returns a different error.
DPERR_CONNECTIONLOST
The service provider connection was reset while data was being sent.
DPERR_ENCRYPTIONFAILED
The requested information could not be digitally encrypted. Encryption is used for message privacy. This error is only relevant in a secure session.
DPERR_ENCRYPTIONNOTSUPPORTED
The type of encryption requested in the DPSECURITYDESC structure is not available. This error is only relevant in a secure session.
DPERR_EXCEPTION
An exception occurred when processing the request.
DPERR_GENERIC
An undefined error condition occurred.
DPERR_INVALIDFLAGS
The flags passed to this method are invalid.
DPERR_INVALIDGROUP
The group ID is not recognized as a valid group ID for this game session.
DPERR_INVALIDINTERFACE
The interface parameter is invalid.
DPERR_INVALIDOBJECT
The DirectPlay object pointer is invalid.
DPERR_INVALIDPARAMS
One or more of the parameters passed to the method are invalid.
DPERR_INVALIDPASSWORD
An invalid password was supplied when attempting to join a session that requires a password.
DPERR_INVALIDPLAYER
The player ID is not recognized as a valid player ID for this game session.
DPERR_INVALIDPRIORITY
The specified priority is not within the range of allowed priorities, which is inclusively 0-65535.
DPERR_LOGONDENIED
The session could not be opened because credentials are required, and either no credentials were supplied, or the credentials were invalid.
DPERR_NOCAPS
The communication link that DirectPlay is attempting to use is not capable of this function.
DPERR_NOCONNECTION
No communication link was established.
DPERR_NOINTERFACE
The interface is not supported.
DPERR_NOMESSAGES
There are no messages in the receive queue.
DPERR_NONAMESERVERFOUND
No name server (host) could be found or created. A host must exist to create a player.
DPERR_NONEWPLAYERS
The session is not accepting any new players.
DPERR_NOPLAYERS
There are no active players in the session.
DPERR_NOSESSIONS
There are no existing sessions for this game.
DPERR_NOTLOBBIED
Returned by the IDirectPlayLobby3::Connect method if the application was not started by using the IDirectPlayLobby3::RunApplication method, or if there is no DPLCONNECTION structure currently initialized for this DirectPlayLobby object.
DPERR_NOTLOGGEDIN
An action cannot be performed because a player or client application is not logged in. Returned by the IDirectPlay4::Send method when the client application tries to send a secure message without being logged in.
DPERR_OUTOFMEMORY
There is insufficient memory to perform the requested operation.
DPERR_PENDING
Not an error, this return indicates that an asynchronous send has reached the point where it is successfully queued. See SendEx for more information.
DPERR_PLAYERLOST
A player has lost the connection to the session.
DPERR_SENDTOOBIG
The message being sent by the IDirectPlay4::Send method is too large.
DPERR_SESSIONLOST
The connection to the session has been lost.
DPERR_SIGNFAILED
The requested information could not be digitally signed. Digital signatures are used to establish the authenticity of messages.
DPERR_TIMEOUT
The operation could not be completed in the specified time.
DPERR_UNAVAILABLE
The requested function is not available at this time.
DPERR_UNINITIALIZED
The requested object has not been initialized.
DPERR_UNKNOWNAPPLICATION
An unknown application was specified.
DPERR_UNKNOWNMESSAGE
The message ID isn't valid. Returned from IDirectPlay4::CancelMessage if the ID of the message to be cancelled is invalid.
DPERR_UNSUPPORTED
The function or feature is not available in this implementation or on this service provider. Returned from IDirectPlay4::GetGroupConnectionSettings and IDirectPlay4::SetGroupConnectionSettings if they are called from a session that is not a lobby session. Returned from IDirectPlay4::SendEx if the priority or timeout is set, and these are not supported by the service provider and DirectPlay protocol is not on. Returned from IDirectPlay4::GetMessageQueue if you check the send queue and this is not supported by the service provider and DirectPlay protocol is not on.
DPERR_USERCANCEL
Can be returned in two ways. 1) The user canceled the connection process during a call to the IDirectPlay4::Open method. 2) The user clicked Cancel in one of the DirectPlay service provider dialog boxes during a call to IDirectPlay4::EnumSessions.
E_UNKNOWN
Usually indicates a catastrophic failure of some sort; for example, the service provider cannot initialize correctly or a protocol such as IPX is not installed correctly on the machine.

Top of Page Top of Page
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.