Microsoft DirectX 9.0

DPN_SP_CAPS Structure

Used to set and retrieve parameters for service providers.


typedef struct _DPN_SP_CAPS {
    DWORD dwSize;
    DWORD dwFlags;
    DWORD dwNumThreads;
    DWORD dwDefaultEnumCount;
    DWORD dwDefaultEnumRetryInterval;
    DWORD dwDefaultEnumTimeout;
    DWORD dwMaxEnumPayloadSize;
    DWORD dwBuffersPerThread;
    DWORD dwSystemBufferSize;


Value must be set to the size of the structure.
Can be a combination of the following flags.
DPNSVR.EXE will provide port sharing for the given SP. Currently this flag is available on Internet Protocol (IP) and Internetwork Packet Exchange (IPX) only. See Using the DirectPlay DPNSVR Application for a further discussion of DPNSVR.
On IP and IPX applications, the service provider has the ability to broadcast to find games if not enough addressing information is passed.
The service provider will use all devices on the system. There is no need to specify a device element.
The service provider will support the thread pool.
Specifies the DP8Sim service provider.
Number of threads the service provider will use for servicing network requests. The default value for this is based on an algorithm that takes into account the number of processors on the system. Most applications will not need to modify this value.

After a service provider is active in your process, you can only increase this value. Decreasing the value will have no effect. The setting is process wide, which means it will affect your current Microsoft?DirectPlay?object and any other DirectPlay objects in your process.

You can specify a lower value than the default if you call the SetSPCaps method before you call an EnumHosts,?B>Connect, or Host method.

Default enumeration count.
Default retry interval, in milliseconds.
Default enumeration timeout value, in milliseconds.
Maximum size of the payload information that can be sent in the pvResponseData member of the structures that accompany the DPN_MSGID_ENUM_HOSTS_QUERY and DPN_MSGID_ENUM_HOSTS_RESPONSE messages.
The number of outstanding receive buffers allocated for each DirectPlay thread. If you increase the number of receive buffers, DirectPlay can pull more data out of the operating system buffers. However, you can also increase latency if data is arriving faster than your application can process it.
The size of the operating system buffer. This buffer holds data from the communications device when your application cannot process data as fast as it arrives. The purpose of this buffer is to prevent data loss if you receive a sudden burst of data, or if the receive threads are momentarily stalled. Increasing dwSystemBufferSize can increase latency if your application cannot process the received data fast enough. You can eliminate the operating system buffer by setting dwSystemBufferSize to 0. However, if you do so, you run the risk of losing data if you cannot process the received data as fast as it arrives.


The dwBuffersPerThread and dwSystemBufferSize members are used only by IP and IPX service providers. The default values for these members are set by the service provider. To determine the default value, call the appropriate GetSPCaps method. Most applications should use the default values for these two members. They are intended primarily for use by developers writing server applications for massively-multiplayer games.

Structure Information

Minimum operating systems Windows 98, Pocket PC 2002

© 2002 Microsoft Corporation. All rights reserved.