Microsoft DirectX 9.0 SDK Update (Summer 2003) |
Return Values Enumerated Type
Errors are represented by negative values and cannot be combined.
Many of the Microsoft® DirectPlay® samples include a GetDirectPlayErrStr function that converts HRESULT values to string names for the DirectPlay errors. You can copy this code into your own applications for diagnostic traces or error reports.
Syntax
typedef enum { DPNSUCCESS_PENDING, DPN_OK, DPNERR_ABORTED, DPNERR_ADDRESSING, DPNERR_ALREADYCONNECTED, DPNERR_ALREADYCLOSING, DPNERR_ALREADYDISCONNECTING, DPNERR_ALREADYINITIALIZED, DPNERR_BUFFERTOOSMALL, DPNERR_CANNOTCANCEL, DPNERR_CANTCREATEGROUP, DPNERR_CANTCREATEPLAYER, DPNERR_CANTLAUNCHAPPLICATION, DPNERR_CONNECTING, DPNERR_CONNECTIONLOST, DPNERR_DATATOOLARGE, DPNERR_DOESNOTEXIST, DPNERR_DPNSVRNOTAVAILABLE, DPNERR_ENUMQUERYTOOLARGE, DPNERR_ENUMRESPONSETOOLARGE, DPNERR_EXCEPTION, DPNERR_GENERIC, DPNERR_GROUPNOTEMPTY, DPNERR_HOSTREJECTEDCONNECTION, DPNERR_HOSTTERMINATEDSESSION, DPNERR_INCOMPLETEADDRESS, DPNERR_INVALIDADDRESSFORMAT, DPNERR_INVALIDAPPLICATION, DPNERR_INVALIDCOMMAND, DPNERR_INVALIDDEVICEADDRESS, DPNERR_INVALIDFLAGS, DPNERR_INVALIDGROUP, DPNERR_INVALIDHANDLE, DPNERR_INVALIDHOSTADDRESS, DPNERR_INVALIDINSTANCE, DPNERR_INVALIDINTERFACE, DPNERR_INVALIDOBJECT, DPNERR_INVALIDPARAM, DPNERR_INVALIDPASSWORD, DPNERR_INVALIDPLAYER, DPNERR_INVALIDPOINTER, DPNERR_INVALIDPRIORITY, DPNERR_INVALIDSTRING, DPNERR_INVALIDURL, DPNERR_INVALIDVERSION, DPNERR_NOCAPS, DPNERR_NOCONNECTION, DPNERR_NOHOSTPLAYER, DPNERR_NOINTERFACE, DPNERR_NORESPONSE, DPNERR_NOTALLOWED, DPNERR_NOTHOST, DPNERR_NOTREADY, DPNERR_OUTOFMEMORY, DPNERR_PENDING, DPNERR_PLAYERALREADYINGROUP, DPNERR_PLAYERNOTINGROUP, DPNERR_PLAYERLOST, DPNERR_PLAYERNOTREACHABLE, DPNERR_SESSIONFULL, DPNERR_TIMEDOUT, DPNERR_UNINITIALIZED, DPNERR_UNSUPPORTED, DPNERR_USERCANCEL, DV_OK, DV_FULLDUPLEX, DV_HALFDUPLEX, DV_PENDING, DVERR_BUFFERTOOSMALL, DVERR_EXCEPTION, DVERR_GENERIC, DVERR_INVALIDFLAGS, DVERR_INVALIDOBJECT, DVERR_INVALIDPARAM, DVERR_INVALIDPLAYER, DVERR_INVALIDGROUP, DVERR_INVALIDHANDLE, DVERR_OUTOFMEMORY, DVERR_PENDING, DVERR_NOTSUPPORTED, DVERR_NOINTERFACE, DVERR_SESSIONLOST, DVERR_NOVOICESESSION, DVERR_CONNECTIONLOST, DVERR_NOTINITIALIZED, DVERR_CONNECTED, DVERR_NOTCONNECTED, DVERR_CONNECTABORTING, DVERR_NOTALLOWED, DVERR_INVALIDTARGET, DVERR_TRANSPORTNOTHOST, DVERR_COMPRESSIONNOTSUPPORTED, DVERR_ALREADYPENDING, DVERR_ALREADYINITIALIZED, DVERR_SOUNDINITFAILURE, DVERR_TIMEOUT, DVERR_CONNECTABORTED, DVERR_NO3DSOUND, DVERR_ALREADYBUFFERED, DVERR_NOTBUFFERED, DVERR_HOSTING, DVERR_NOTHOSTING, DVERR_INVALIDDEVICE, DVERR_RECORDSYSTEMERROR, DVERR_PLAYBACKSYSTEMERROR, DVERR_SENDERROR, DVERR_USERCANCEL, DVERR_UNKNOWN, DVERR_RUNSETUP, DVERR_INCOMPATIBLEVERSION, DVERR_INITIALIZED, DVERR_INVALIDPOINTER, DVERR_NOTRANSPORT, DVERR_NOCALLBACK, DVERR_TRANSPORTNOTINIT, DVERR_TRANSPORTNOSESSION, DVERR_TRANSPORTNOPLAYER, DP8SIM_OK, DP8SIMERR_ALREADYINITIALIZED, DP8SIMERR_INVALIDFLAGS, DP8SIMERR_INVALIDOBJECT, DP8SIMERR_MISMATCHEDVERSION, DP8SIMERR_NOTINITIALIZED, DP8SIMERR_INVALIDPARAM, DP8SIMERR_INVALIDPOINTER } Return Values;
Constants
- DPNSUCCESS_PENDING
An asynchronous operation has reached the point where it is successfully queued.
- DPN_OK
The operation completed successfully. This value is equal to the S_OK standard Component Object Model (COM) return value.
- DPNERR_ABORTED
The operation was canceled before it could be completed.
- DPNERR_ADDRESSING
The address specified is invalid.
- DPNERR_ALREADYCONNECTED
The object is already connected to the session.
- DPNERR_ALREADYCLOSING
An attempt to call the Close method on a session has been made more than once.
- DPNERR_ALREADYDISCONNECTING
The client is already disconnecting from the session.
- DPNERR_ALREADYINITIALIZED
The object has already been initialized.
- DPNERR_BUFFERTOOSMALL
The supplied buffer is not large enough to contain the requested data.
- DPNERR_CANNOTCANCEL
The operation could not be canceled.
- DPNERR_CANTCREATEGROUP
A new group cannot be created.
- DPNERR_CANTCREATEPLAYER
A new player cannot be created.
- DPNERR_CANTLAUNCHAPPLICATION
The lobby cannot launch the specified application.
- DPNERR_CONNECTING
The method is in the process of connecting to the network.
- DPNERR_CONNECTIONLOST
The service provider connection was reset while data was being sent.
- DPNERR_DATATOOLARGE
The application data is too large for the service provider's Maximum Transmission Unit.
- DPNERR_DOESNOTEXIST
Requested element is not part of the address or the requested application globally unique identifier (GUID) is not registered.
- DPNERR_DPNSVRNOTAVAILABLE
Port 6073 is already in use.
- DPNERR_ENUMQUERYTOOLARGE
The query data specified is too large.
- DPNERR_ENUMRESPONSETOOLARGE
The response to an enumeration query is too large.
- DPNERR_EXCEPTION
An exception occurred when processing the request.
- DPNERR_GENERIC
An undefined error condition occurred.
- DPNERR_GROUPNOTEMPTY
The specified group is not empty.
- DPNERR_HOSTREJECTEDCONNECTION
The DPN_MSGID_INDICATE_CONNECT system message returned something other than S_OK in response to a connect request.
- DPNERR_HOSTTERMINATEDSESSION
The host in a peer session (with host migration enabled) terminated the session.
- DPNERR_INCOMPLETEADDRESS
The address specified is not complete.
- DPNERR_INVALIDADDRESSFORMAT
The address format is invalid.
- DPNERR_INVALIDAPPLICATION
The GUID supplied for the application is invalid.
- DPNERR_INVALIDCOMMAND
The command specified is invalid.
- DPNERR_INVALIDDEVICEADDRESS
The address for the local computer or adapter is invalid.
- DPNERR_INVALIDFLAGS
The flags passed to this method are invalid.
- DPNERR_INVALIDGROUP
The group identifier (ID) is not recognized as a valid group ID for this game session.
- DPNERR_INVALIDHANDLE
The handle specified is invalid.
- DPNERR_INVALIDHOSTADDRESS
The specified remote address is invalid.
- DPNERR_INVALIDINSTANCE
The GUID for the application instance is invalid.
- DPNERR_INVALIDINTERFACE
The interface parameter is invalid. This value will be returned in a connect request if the connecting player was not a client in a client/server game or a peer in a peer-to-peer game.
- DPNERR_INVALIDOBJECT
The DirectPlay object pointer is invalid.
- DPNERR_INVALIDPARAM
One or more of the parameters passed to the method are invalid.
- DPNERR_INVALIDPASSWORD
An invalid password was supplied when attempting to join a session that requires a password.
- DPNERR_INVALIDPLAYER
The player ID is not recognized as a valid player ID for this game session.
- DPNERR_INVALIDPOINTER
The pointer specified as a parameter is invalid.
- DPNERR_INVALIDPRIORITY
The specified priority is not within the range of allowed priorities, which is inclusively from 0 through 65535.
- DPNERR_INVALIDSTRING
String specified as a parameter is invalid.
- DPNERR_INVALIDURL
Specified string is not a valid DirectPlay URL.
- DPNERR_INVALIDVERSION
There was an attempt to connect to an invalid version of DirectPlay.
- DPNERR_NOCAPS
The communication link that DirectPlay is attempting to use is not capable of this function.
- DPNERR_NOCONNECTION
No communication link was established.
- DPNERR_NOHOSTPLAYER
There is currently no player acting as the host of the session.
- DPNERR_NOINTERFACE
The interface is not supported.
- DPNERR_NORESPONSE
There was no response from the specified target.
- DPNERR_NOTALLOWED
This function is not allowed on this object.
- DPNERR_NOTHOST
An attempt by the client to connect to a nonhost computer. Additionally, this error value can be returned by a nonhost that tries to set the application description.
- DPNERR_NOTREADY
The object is not ready for use.
- DPNERR_OUTOFMEMORY
There is insufficient memory to perform the requested operation.
- DPNERR_PENDING
Not an error, this return indicates that an asynchronous operation has reached the point where it is successfully queued. SUCCEEDED(DPNERR_PENDING) will return TRUE. This error value has been superseded by DPNERR_SUCCESS, which should be used by all new applications. DPNERR_PENDING is only included for backward compatibility.
- DPNERR_PLAYERALREADYINGROUP
The player ID is already included in the group.
- DPNERR_PLAYERNOTINGROUP
The player ID is not included in the group.
- DPNERR_PLAYERLOST
A player has lost the connection to the session.
- DPNERR_PLAYERNOTREACHABLE
A player has tried to join a peer-peer session where at least one other existing player in the session cannot connect to the joining player.
- DPNERR_SESSIONFULL
The request to connect to the host or server failed because the maximum number of players allotted for the session has been reached.
- DPNERR_TIMEDOUT
The operation could not complete because it has timed out.
- DPNERR_UNINITIALIZED
The requested object has not been initialized.
- DPNERR_UNSUPPORTED
The function or feature is not available in this implementation or on this service provider.
- DPNERR_USERCANCEL
The user canceled the operation.
- DV_OK
The request completed successfully.
- DV_FULLDUPLEX
The sound card is capable of full-duplex operation.
- DV_HALFDUPLEX
The sound card can only be run in half-duplex mode.
- DV_PENDING
An asynchronous operation has reached the point where it is successfully queued.
- DVERR_BUFFERTOOSMALL
The supplied buffer is not large enough to contain the requested data.
- DVERR_EXCEPTION
An exception occurred when processing the request.
- DVERR_GENERIC
An undefined error condition occurred.
- DVERR_INVALIDFLAGS
The flags passed to this method are invalid.
- DVERR_INVALIDOBJECT
The DirectPlay object pointer is invalid.
- DVERR_INVALIDPARAM
One or more of the parameters passed to the method are invalid.
- DVERR_INVALIDPLAYER
The player ID is not recognized as a valid player ID for this game session.
- DVERR_INVALIDGROUP
The group ID is not recognized as a valid group ID for this game session.
- DVERR_INVALIDHANDLE
The handle specified is invalid.
- DVERR_OUTOFMEMORY
There is insufficient memory to perform the requested operation.
- DVERR_PENDING
Not an error, this return indicates that an asynchronous operation has reached the point where it is successfully queued. This error value has been deprecated. It has been replaced by DV_PENDING.
- DVERR_NOTSUPPORTED
The operation is not supported.
- DVERR_NOINTERFACE
The specified interface is not supported. Could indicate using the wrong version of DirectPlay.
- DVERR_SESSIONLOST
The transport has lost the connection to the session.
- DVERR_NOVOICESESSION
The session specified is not a voice session.
- DVERR_CONNECTIONLOST
The connection to the voice session has been lost.
- DVERR_NOTINITIALIZED
The IDirectPlayVoiceClient::Initialize IDirectPlayVoiceClient8::Initialize or IDirectPlayVoiceServer::Initialize IDirectPlayVoiceServer8::Initialize method must be called before calling this method.
- DVERR_CONNECTED
The DirectPlay Voice object is connected.
- DVERR_NOTCONNECTED
The DirectPlay Voice object is not connected.
- DVERR_CONNECTABORTING
The connection is being disconnected.
- DVERR_NOTALLOWED
The object does not have the permission to perform this operation.
- DVERR_INVALIDTARGET
The specified target is not a valid player ID or group ID for this voice session.
- DVERR_TRANSPORTNOTHOST
The object is not the host of the voice session.
- DVERR_COMPRESSIONNOTSUPPORTED
The specified compression type is not supported on the local computer.
- DVERR_ALREADYPENDING
An asynchronous call of this type is already pending.
- DVERR_ALREADYINITIALIZED
The object has already been initialized.
- DVERR_SOUNDINITFAILURE
A failure was encountered initializing the sound card.
- DVERR_TIMEOUT
The operation could not be performed in the specified time.
- DVERR_CONNECTABORTED
The connect operation was canceled before it could be completed.
- DVERR_NO3DSOUND
The local computer does not support 3-D sound.
- DVERR_ALREADYBUFFERED
There is already a user buffer for the specified ID.
- DVERR_NOTBUFFERED
There is no user buffer for the specified ID.
- DVERR_HOSTING
The object is the host of the session.
- DVERR_NOTHOSTING
The object is not the host of the session.
- DVERR_INVALIDDEVICE
The specified device is invalid.
- DVERR_RECORDSYSTEMERROR
An error in the recording system occurred.
- DVERR_PLAYBACKSYSTEMERROR
An error in the playback system occurred.
- DVERR_SENDERROR
An error occurred while sending data.
- DVERR_USERCANCEL
The user canceled the operation.
- DVERR_UNKNOWN
An unknown error occurred.
- DVERR_RUNSETUP
The specified audio configuration has not been tested. Call the IDirectPlayVoiceTest::CheckAudioSetup method.
- DVERR_INCOMPATIBLEVERSION
The client connected to a voice session that is incompatible with the host.
- DVERR_INITIALIZED
The Initialize method failed because the object has already been initialized.
- DVERR_INVALIDPOINTER
The pointer specified is invalid.
- DVERR_NOTRANSPORT
The specified object is not a valid transport.
- DVERR_NOCALLBACK
This operation cannot be performed because no callback function was specified.
- DVERR_TRANSPORTNOTINIT
The specified transport is not yet initialized.
- DVERR_TRANSPORTNOSESSION
The specified transport is valid but is not connected/hosting.
- DVERR_TRANSPORTNOPLAYER
The specified transport is connected/hosting but no local player exists.
- DP8SIM_OK
The DP8Sim control object was successfully initialized.
- DP8SIMERR_ALREADYINITIALIZED
The DP8Sim control object has already been initialized.
- DP8SIMERR_INVALIDFLAGS
The flags passed to this method are invalid.
- DP8SIMERR_INVALIDOBJECT
The DP8Sim control object specified is invalid.
- DP8SIMERR_MISMATCHEDVERSION
A different version of DP8Sim is already in use on this system.
- DP8SIMERR_NOTINITIALIZED
The DP8Sim control object has not been initialized.
- DP8SIMERR_INVALIDPARAM
One or more of the parameters passed to the method are invalid.
- DP8SIMERR_INVALIDPOINTER
A pointer specified as a parameter is invalid.
Remarks
The following table lists the interfaces to which the error codes listed apply.
For a list of the error codes each method can return, see the individual method descriptions.
Enumerated Type Information
Minimum operating systems Windows 98, Windows NT 2000, Windows XP