?/TD>
Microsoft DirectX 9.0

IDirectPlay8Server::SetApplicationDesc Method


Changes the settings for the application that is being hosted. Only some settings can be changed.

Syntax

HRESULT SetApplicationDesc(      

    const DPN_APPLICATION_DESC *const pad,     const DWORD dwFlags );

Parameters

pad
[in] Pointer to a DPN_APPLICATION_DESC structure that describes the application settings to modify.
dwFlags
[in] Reserved. Must be 0.

Return Value

Returns S_OK if successful, or one of the following error values.

DPNERR_DATATOOLARGEThe application data is too large for the service provider's Maximum Transmission Unit.
DPNERR_INVALIDFLAGSThe flags passed to this method are invalid.
DPNERR_INVALIDPARAMOne or more of the parameters passed to the method are invalid.


Remarks

You can use this method to modify only the following members of the DPN_APPLICATION_DESC structure.

When IDirectPlay8Server::SetApplicationDesc is called, Microsoft?DirectPlay?makes a copy of the data pad points to. You do not need to save the DPN_APPLICATION_DESC structure once IDirectPlay8Server::SetApplicationDesc returns.

You cannot set the dwMaxPlayers member to a smaller value than the current number of players in the session.

The maximum size of the application data that you assign to the pvApplicationReservedData member of the DPN_APPLICATION_DESC structure is limited by the service provider's Maximum Transmission Unit. If your application data is too large, the method will fail and return DPNERR_DATATOOLARGE.

To avoid accidentally overwriting the application description, applications should call IDirectPlay8Server::GetApplicationDesc and fill in the DPN_APPLICATION_DESC structure before calling IDirectPlay8Server::SetApplicationDesc.



© 2002 Microsoft Corporation. All rights reserved.