📄 dplay.h
字号:
* Return status about progress of open instead of showing
* any status dialogs.
*/
#define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS
/****************************************************************************
*
* DPLCONNECTION flags
*
****************************************************************************/
/*
* This application should create a new session as
* described by the DPSESIONDESC structure
*/
#define DPLCONNECTION_CREATESESSION DPOPEN_CREATE
/*
* This application should join the session described by
* the DPSESIONDESC structure with the lpAddress data
*/
#define DPLCONNECTION_JOINSESSION DPOPEN_JOIN
/****************************************************************************
*
* Receive API flags
* Default is DPRECEIVE_ALL
*
****************************************************************************/
/*
* Get the first message in the queue
*/
#define DPRECEIVE_ALL 0x00000001
/*
* Get the first message in the queue directed to a specific player
*/
#define DPRECEIVE_TOPLAYER 0x00000002
/*
* Get the first message in the queue from a specific player
*/
#define DPRECEIVE_FROMPLAYER 0x00000004
/*
* Get the message but don't remove it from the queue
*/
#define DPRECEIVE_PEEK 0x00000008
/****************************************************************************
*
* Send API flags
*
****************************************************************************/
/*
* Send the message using a guaranteed send method.
* Default is non-guaranteed.
*/
#define DPSEND_GUARANTEED 0x00000001
/*
* This flag is obsolete. It is ignored by DirectPlay
*/
#define DPSEND_HIGHPRIORITY 0x00000002
/*
* This flag is obsolete. It is ignored by DirectPlay
*/
#define DPSEND_OPENSTREAM 0x00000008
/*
* This flag is obsolete. It is ignored by DirectPlay
*/
#define DPSEND_CLOSESTREAM 0x00000010
/*
* Send the message digitally signed to ensure authenticity.
*/
#define DPSEND_SIGNED 0x00000020
/*
* Send the message with encryption to ensure privacy.
*/
#define DPSEND_ENCRYPTED 0x00000040
// andyco - added this so we can make addforward async.
// needs to be sanitized when we add / expose full async
// support. 8/3/97.
#define DPSEND_ASYNC 0x00000200
/****************************************************************************
*
* SetGroupData, SetGroupName, SetPlayerData, SetPlayerName,
* SetSessionDesc API flags.
* Default is DPSET_REMOTE.
*
****************************************************************************/
/*
* Propagate the data to all players in the session
*/
#define DPSET_REMOTE 0x00000000
/*
* Do not propagate the data to other players
*/
#define DPSET_LOCAL 0x00000001
/*
* Used with DPSET_REMOTE, use guaranteed message send to
* propagate the data
*/
#define DPSET_GUARANTEED 0x00000002
/****************************************************************************
*
* DirectPlay system messages and message data structures
*
* All system message come 'From' player DPID_SYSMSG. To determine what type
* of message it is, cast the lpData from Receive to DPMSG_GENERIC and check
* the dwType member against one of the following DPSYS_xxx constants. Once
* a match is found, cast the lpData to the corresponding of the DPMSG_xxx
* structures to access the data of the message.
*
****************************************************************************/
/*
* A new player or group has been created in the session
* Use DPMSG_CREATEPLAYERORGROUP. Check dwPlayerType to see if it
* is a player or a group.
*/
#define DPSYS_CREATEPLAYERORGROUP 0x0003
/*
* A player has been deleted from the session
* Use DPMSG_DESTROYPLAYERORGROUP
*/
#define DPSYS_DESTROYPLAYERORGROUP 0x0005
/*
* A player has been added to a group
* Use DPMSG_ADDPLAYERTOGROUP
*/
#define DPSYS_ADDPLAYERTOGROUP 0x0007
/*
* A player has been removed from a group
* Use DPMSG_DELETEPLAYERFROMGROUP
*/
#define DPSYS_DELETEPLAYERFROMGROUP 0x0021
/*
* This DirectPlay object lost its connection with all the
* other players in the session.
* Use DPMSG_SESSIONLOST.
*/
#define DPSYS_SESSIONLOST 0x0031
/*
* The current host has left the session.
* This DirectPlay object is now the host.
* Use DPMSG_HOST.
*/
#define DPSYS_HOST 0x0101
/*
* The remote data associated with a player or
* group has changed. Check dwPlayerType to see
* if it is a player or a group
* Use DPMSG_SETPLAYERORGROUPDATA
*/
#define DPSYS_SETPLAYERORGROUPDATA 0x0102
/*
* The name of a player or group has changed.
* Check dwPlayerType to see if it is a player
* or a group.
* Use DPMSG_SETPLAYERORGROUPNAME
*/
#define DPSYS_SETPLAYERORGROUPNAME 0x0103
/*
* The session description has changed.
* Use DPMSG_SETSESSIONDESC
*/
#define DPSYS_SETSESSIONDESC 0x0104
/*
* A group has been added to a group
* Use DPMSG_ADDGROUPTOGROUP
*/
#define DPSYS_ADDGROUPTOGROUP 0x0105
/*
* A group has been removed from a group
* Use DPMSG_DELETEGROUPFROMGROUP
*/
#define DPSYS_DELETEGROUPFROMGROUP 0x0106
/*
* A secure player-player message has arrived.
* Use DPMSG_SECUREMESSAGE
*/
#define DPSYS_SECUREMESSAGE 0x0107
/*
* Start a new session.
* Use DPMSG_STARTSESSION
*/
#define DPSYS_STARTSESSION 0x0108
/*
* A chat message has arrived
* Use DPMSG_CHAT
*/
#define DPSYS_CHAT 0x0109
/*
* Used in the dwPlayerType field to indicate if it applies to a group
* or a player
*/
#define DPPLAYERTYPE_GROUP 0x00000000
#define DPPLAYERTYPE_PLAYER 0x00000001
/*
* DPMSG_GENERIC
* Generic message structure used to identify the message type.
*/
typedef struct
{
DWORD dwType; // Message type
} DPMSG_GENERIC, FAR *LPDPMSG_GENERIC;
/*
* DPMSG_CREATEPLAYERORGROUP
* System message generated when a new player or group
* created in the session with information about it.
*/
typedef struct
{
DWORD dwType; // Message type
DWORD dwPlayerType; // Is it a player or group
DPID dpId; // ID of the player or group
DWORD dwCurrentPlayers; // current # players & groups in session
LPVOID lpData; // pointer to remote data
DWORD dwDataSize; // size of remote data
DPNAME dpnName; // structure with name info
// the following fields are only available when using
// the IDirectPlay3 interface or greater
DPID dpIdParent; // id of parent group
DWORD dwFlags; // player or group flags
} DPMSG_CREATEPLAYERORGROUP, FAR *LPDPMSG_CREATEPLAYERORGROUP;
/*
* DPMSG_DESTROYPLAYERORGROUP
* System message generated when a player or group is being
* destroyed in the session with information about it.
*/
typedef struct
{
DWORD dwType; // Message type
DWORD dwPlayerType; // Is it a player or group
DPID dpId; // player ID being deleted
LPVOID lpLocalData; // copy of players local data
DWORD dwLocalDataSize; // sizeof local data
LPVOID lpRemoteData; // copy of players remote data
DWORD dwRemoteDataSize; // sizeof remote data
// the following fields are only available when using
// the IDirectPlay3 interface or greater
DPNAME dpnName; // structure with name info
DPID dpIdParent; // id of parent group
DWORD dwFlags; // player or group flags
} DPMSG_DESTROYPLAYERORGROUP, FAR *LPDPMSG_DESTROYPLAYERORGROUP;
/*
* DPMSG_ADDPLAYERTOGROUP
* System message generated when a player is being added
* to a group.
*/
typedef struct
{
DWORD dwType; // Message type
DPID dpIdGroup; // group ID being added to
DPID dpIdPlayer; // player ID being added
} DPMSG_ADDPLAYERTOGROUP, FAR *LPDPMSG_ADDPLAYERTOGROUP;
/*
* DPMSG_DELETEPLAYERFROMGROUP
* System message generated when a player is being
* removed from a group
*/
typedef DPMSG_ADDPLAYERTOGROUP DPMSG_DELETEPLAYERFROMGROUP;
typedef DPMSG_DELETEPLAYERFROMGROUP FAR *LPDPMSG_DELETEPLAYERFROMGROUP;
/*
* DPMSG_ADDGROUPTOGROUP
* System message generated when a group is being added
* to a group.
*/
typedef struct
{
DWORD dwType; // Message type
DPID dpIdParentGroup; // group ID being added to
DPID dpIdGroup; // group ID being added
} DPMSG_ADDGROUPTOGROUP, FAR *LPDPMSG_ADDGROUPTOGROUP;
/*
* DPMSG_DELETEGROUPFROMGROUP
* System message generated when a GROUP is being
* removed from a group
*/
typedef DPMSG_ADDGROUPTOGROUP DPMSG_DELETEGROUPFROMGROUP;
typedef DPMSG_DELETEGROUPFROMGROUP FAR *LPDPMSG_DELETEGROUPFROMGROUP;
/*
* DPMSG_SETPLAYERORGROUPDATA
* System message generated when remote data for a player or
* group has changed.
*/
typedef struct
{
DWORD dwType; // Message type
DWORD dwPlayerType; // Is it a player or group
DPID dpId; // ID of player or group
LPVOID lpData; // pointer to remote data
DWORD dwDataSize; // size of remote data
} DPMSG_SETPLAYERORGROUPDATA, FAR *LPDPMSG_SETPLAYERORGROUPDATA;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -