Platform SDK: DirectX

DPCAPS

The DPCAPS structure contains the capabilities of a DirectPlay object after a call to the IDirectPlay4::GetCaps or IDirectPlay4::GetPlayerCaps method. Any of these capabilities can differ, depending on whether guaranteed or nonguaranteed capabilities are requested. This structure is read-only. Note that capabilities indicating which aspects of the IDirectPlay4::SendEx method are supported, such as the DPCAPS_SENDPRIORITYSUPPORTED and DPCAPS_SENDTIMEOUTSUPPORTED flags in dwFlags, are not available until after the session has been opened. If the application hosting the session has specified the DPSESSION_DIRECTPLAYPROTOCOL flag in the DPSESSIONDESC2 structure, all the SendEx options are supported.

typedef struct {
    DWORD dwSize;
    DWORD dwFlags; 
    DWORD dwMaxBufferSize;
    DWORD dwMaxQueueSize; 
    DWORD dwMaxPlayers; 
    DWORD dwHundredBaud; 
    DWORD dwLatency; 
    DWORD dwMaxLocalPlayers;
    DWORD dwHeaderLength;
    DWORD dwTimeout;
} DPCAPS, FAR *LPDPCAPS;

Members

dwSize
Size of the DPCAPS structure, dwSize = sizeof(DPCAPS). Your application must set this member before it uses this structure; otherwise, an error will result.
dwFlags
Flags that indicate the properties of the DirectPlay object.
DPCAPS_ASYNCCANCELALLSUPPORTED
Indicates that canceling all pending asynchronous messages is supported. This flag indicates that the only form of cancellation supported is the ability to cancel all unsent messages. Any attempt to cancel messages by specifying a priority range or a message ID will return DPERR_UNSUPPORTED. By contrast, the DPCAPS_ASYNCCANCELSUPPORTED flag indicates that all types of cancellation are supported. Note that capabilities indicating which aspects of SendEx are supported are not available until after the session has been opened.
DPCAPS_ASYNCCANCELSUPPORTED
Indicates that canceling asynchronous messages is supported. All types of cancellation are supported: canceling by message ID, canceling by priority range, and canceling all unsent messages. Note that capabilities indicating which aspects of SendEx are supported are not available until after the session has been opened.
DPCAPS_ASYNCSUPPORTED
Indicates that asynchronous messaging is supported. Thus, an application can use the DPSEND_ASYNC flag on SendEx. See Remarks for more information. Note that capabilities indicating which aspects of SendEx are supported are not available until after the session has been opened.
DPCAPS_ENCRYPTIONSUPPORTED
Indicates that message encryption is supported by this DirectPlay object, either because the session is a secure session, or because the service provider can encrypt messages.
DPCAPS_GROUPOPTIMIZED
Indicates that the service provider bound to this DirectPlay object can optimize group (multicast) messaging.
DPCAPS_GUARANTEEDOPTIMIZED
Indicates that the service provider bound to this DirectPlay object supports guaranteed message delivery.
DPCAPS_GUARANTEEDSUPPORTED
Indicates that the DirectPlay object supports guaranteed message delivery, either because the service provider supports it, or because DirectPlay implements it on a nonguaranteed service provider.
DPCAPS_ISHOST
Indicates that the DirectPlay object created by the calling application is the session host.
DPCAPS_KEEPALIVEOPTIMIZED
Indicates that the service provider can detect when the connection to the session has been lost.
DPCAPS_SENDPRIORITYSUPPORTED
Indicates that the message priority set in SendEx is supported. Note that capabilities indicating which aspects of SendEx are supported are not available until after the session has been opened.
DPCAPS_SENDTIMEOUTSUPPORTED
Indicates that the time-out for messages specified in SendEx is supported. This flag can be set by the service provider or by DirectPlay. Note that capabilities indicating which aspects of SendEx are supported are not available until after the session has been opened.
DPCAPS_SIGNINGSUPPORTED
Indicates that message authentication is supported by this DirectPlay object, either because it is a secure session, or because the service provider can sign messages.
dwMaxBufferSize
Maximum number of bytes that can be sent in a single packet by this service provider. Larger messages will be sent by using more than one packet.
dwMaxQueueSize
This member is no longer used.
dwMaxPlayers
Maximum number of local and remote players supported in a session by this DirectPlay object.
dwHundredBaud
Bandwidth specified in multiples of 100 bits per second. For example, a value of 24 specifies 2400 bits per second.
dwLatency
Estimate of latency by the service provider, in milliseconds. If this value is 0, DirectPlay cannot provide an estimate. Accuracy for some service providers rests on application-to-application testing, taking into consideration the average message size. Latency can differ, depending on whether the application uses guaranteed or nonguaranteed message delivery.
dwMaxLocalPlayers
Maximum number of local players supported in a session.
dwHeaderLength
Size, in bytes, of the header that will be added to player messages by this DirectPlay object. Note that the header size depends on which service provider is in use.
dwTimeout
Service provider's suggested time-out value. By default, DirectPlay will use this time-out value when waiting for replies to messages.

Remarks

The DPCAPS_ASYNCSUPPORTED, DPCAPS_SENDTIMEOUTSUPPORTED, DPCAPS_SENDPRIORITYSUPPORTED, DPCAPS_ASYNCCANCELSUPPORTED, and DPCAPS_ASYNCCANCELALLSUPPORTED flags indicate the communications capabilities of the current session.

In order for an application to be able to use DPSEND_ASYNC on SendEx one (or both) of the following conditions must be true.

You specified the DPSESSION_DIRECTPLAYPROTOCOL flag when the session was created.

The service provider supports asynchronous messaging.

This means that modem, serial, and Internetwork Packet Exchange (IPX) service providers have guaranteed messaging available to them, but they do not have asynchronous messaging, unless you explicitly set the DPSESSION_DIRECTPLAYPROTOCOL flag. The TCP/IP service provider implements asynchronous messaging when the computer has Windows Sockets 2.0 present.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dplay.h.

See Also

IDirectPlay4::Send, IDirectPlay4::SendEx, IDirectPlay4::GetCaps, IDirectPlay4::GetPlayerCaps