Microsoft DirectX 9.0 SDK Update (Summer 2003)

DPN_APPLICATION_DESC Structure


Describes the settings for a Microsoft® DirectPlay® application.

Syntax

typedef struct _DPN_APPLICATION_DESC {
    DWORD dwSize;
    DWORD dwFlags;
    GUID guidInstance;
    GUID guidApplication;
    DWORD dwMaxPlayers;
    DWORD dwCurrentPlayers;
    WCHAR *pwszSessionName;
    WCHAR *pwszPassword;
    PVOID pvReservedData;
    DWORD dwReservedDataSize;
    PVOID pvApplicationReservedData;
    DWORD dwApplicationReservedDataSize;
} DPN_APPLICATION_DESC, *PDPN_APPLICATION_DESC;

Members

dwSize
Size of the DPN_APPLICATION_DESC structure. The application must set this member before it uses the structure.
dwFlags
One of the following flags describing application behavior.
DPNSESSION_CLIENT_SERVER
This type of session is client/server. This flag cannot be combined with DPNSESSION_MIGRATE_HOST.
DPNSESSION_MIGRATE_HOST
Used in peer-to-peer sessions, enables host migration. This flag cannot be combined with DPNSESSION_CLIENT_SERVER.
DPNSESSION_NODPNSVR
Do not forward enumerations to your host from DPNSVR. See Using the DirectPlay DPNSVR Application for details.
DPNSESSION_REQUIREPASSWORD
The session is password protected. If this flag is set, pwszPassword must be set to a valid string.
DPNSESSION_NOENUMS
Do not allow DirectPlay to start enumeration queries.
DPNSESSION_FAST_SIGNED
Add an 8 byte value to each packet. The packet must contain this value before a receiver accepts it.
DPNSESSION_FULL_SIGNED
Add a rolling 8 byte SHA1 hash value based on the contents of the packet. The packet must have the correct SHA1 signature before it is accepted.
guidInstance
Globally unique identifier (GUID) that is generated by DirectPlay at startup . This member is an [out] parameter when calling IDirectPlay8Peer::GetApplicationDesc, IDirectPlay8Client::GetApplicationDesc, or IDirectPlay8Server::GetApplicationDesc. It is an optional [in] parameter when calling the IDirectPlay8Peer::Connect and IDirectPlay8Client::Connect methods. It must be set to GUID_NULL when you call the IDirectPlay8Peer::SetApplicationDesc or IDirectPlay8Server::SetApplicationDesc methods. You cannot obtain this GUID by calling the IDirectPlay8Server::Host or IDirectPlay8Peer::Host methods. You must obtain the GUID by calling a GetApplicationDesc method.
guidApplication
Application GUID.
dwMaxPlayers
Variable of type DWORD, specifying the maximum number of players allowed in the session. Set this member to 0 to specify an unlimited number of players.
dwCurrentPlayers
Variable of type DWORD specifying the number of players currently connected to the session. This member is is set only by the IDirectPlay8Peer::GetApplicationDesc, IDirectPlay8Client::GetApplicationDesc, and IDirectPlay8Server::GetApplicationDesc methods.
pwszSessionName
Pointer to a variable of type WCHAR specifying the name of the session. This member is set by the host or server only for informational purposes. A client cannot use this name to connect to a host or server.
pwszPassword
Pointer to a variable of type WCHAR specifying the Unicode password that is required to connect to the session. This must be NULL if the DPNSESSION_REQUIREPASSWORD is not set in the dwFlags member.
pvReservedData
Pointer to DirectPlay reserved data. An application should never modify this value.
dwReservedDataSize
Variable of type DWORD specifying the size of data contained in the pvReservedData member. An application should never modify this value.
pvApplicationReservedData
Pointer to application-specific reserved data. This value is optional and may be set to NULL.
dwApplicationReservedDataSize
Variable of type DWORD specifying the size of the data in the pvApplicationReservedData member. This value is optional and may be set to 0.

Remarks

Multiple instances of the application can run simultaneously in a session. If multiple instances are running, each will have a unique DPN_APPLICATION_DESC structure associated with it. "Application" refers to a specific instance of an application.

The dwMaxPlayers, pvApplicationReservedData, dwApplicationReservedDataSize, pwszPassword, and pwszSessionName members can be set when calling the IDirectPlay8Peer::Host, IDirectPlay8Server::Host, IDirectPlay8Peer::SetApplicationDesc, or IDirectPlay8Server::SetApplicationDesc methods.

Setting either the DPNSESSION_FAST_SIGNED or the DPNSESSION_FULL_SIGNED flag prevents players using Microsoft DirectX® 8.1 or earlier versions from being able to connect to the session. These flags cannot be used together.

security note Security Alert  When connecting to a password-protected session, the data in the pwszPassword member is transmitted in clear text to the host.

Structure Information

Headerdplay8.h
Minimum operating systems Windows 98, Pocket PC 2002


© 2003 Microsoft Corporation. All rights reserved.