📄 dplay.h
字号:
/*** IDirectPlay3 methods ***/
STDMETHOD(AddGroupToGroup) (THIS_ DPID, DPID) PURE;
STDMETHOD(CreateGroupInGroup) (THIS_ DPID,LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
STDMETHOD(DeleteGroupFromGroup) (THIS_ DPID,DPID) PURE;
STDMETHOD(EnumConnections) (THIS_ LPCGUID,LPDPENUMCONNECTIONSCALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(EnumGroupsInGroup) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD, DPID, LPVOID, LPDWORD) PURE;
STDMETHOD(InitializeConnection) (THIS_ LPVOID,DWORD) PURE;
STDMETHOD(SecureOpen) (THIS_ LPCDPSESSIONDESC2,DWORD,LPCDPSECURITYDESC,LPCDPCREDENTIALS) PURE;
STDMETHOD(SendChatMessage) (THIS_ DPID,DPID,DWORD,LPDPCHAT);
STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD,DPID,LPDPLCONNECTION) PURE;
STDMETHOD(StartSession) (THIS_ DWORD,DPID);
STDMETHOD(GetGroupFlags) (THIS_ DPID,LPDWORD);
STDMETHOD(GetGroupParent) (THIS_ DPID,LPDPID);
STDMETHOD(GetPlayerAccount) (THIS_ DPID, DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(GetPlayerFlags) (THIS_ DPID,LPDWORD);
};
/****************************************************************************
*
* IDirectPlay3 interface macros
*
****************************************************************************/
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectPlay3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlay3_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlay3_Release(p) (p)->lpVtbl->Release(p)
#define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
#define IDirectPlay3_Close(p) (p)->lpVtbl->Close(p)
#define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
#define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
#define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
#define IDirectPlay3_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
#define IDirectPlay3_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
#define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
#define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
#define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
#define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
#define IDirectPlay3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
#define IDirectPlay3_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
#define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
#define IDirectPlay3_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
#define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
#define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
#define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
#define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
#define IDirectPlay3_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
#define IDirectPlay3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
#define IDirectPlay3_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
#define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
#define IDirectPlay3_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
#define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
#define IDirectPlay3_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
#define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
#define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
#define IDirectPlay3_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
#define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b)
#define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f)
#define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b)
#define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d)
#define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e)
#define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d)
#define IDirectPlay3_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b)
#define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d)
#define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d)
#define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c)
#define IDirectPlay3_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
#define IDirectPlay3_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b)
#define IDirectPlay3_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b)
#define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d)
#define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b)
#else /* C++ */
#define IDirectPlay3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlay3_AddRef(p) (p)->AddRef()
#define IDirectPlay3_Release(p) (p)->Release()
#define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
#define IDirectPlay3_Close(p) (p)->Close()
#define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
#define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f)
#define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
#define IDirectPlay3_DestroyGroup(p,a) (p)->DestroyGroup(a)
#define IDirectPlay3_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
#define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e)
#define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
#define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
#define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
#define IDirectPlay3_GetCaps(p,a,b) (p)->GetCaps(a,b)
#define IDirectPlay3_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
#define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d)
#define IDirectPlay3_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c)
#define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c)
#define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c)
#define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d)
#define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c)
#define IDirectPlay3_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b)
#define IDirectPlay3_Initialize(p,a) (p)->Initialize(a)
#define IDirectPlay3_Open(p,a,b) (p)->Open(a,b)
#define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
#define IDirectPlay3_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
#define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d)
#define IDirectPlay3_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c)
#define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d)
#define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
#define IDirectPlay3_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b)
#define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->AddGroupToGroup(a,b)
#define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->CreateGroupInGroup(a,b,c,d,e,f)
#define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->DeleteGroupFromGroup(a,b)
#define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->EnumConnections(a,b,c,d)
#define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->EnumGroupsInGroup(a,b,c,d,e)
#define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->GetGroupConnectionSettings(a,b,c,d)
#define IDirectPlay3_InitializeConnection(p,a,b) (p)->InitializeConnection(a,b)
#define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->SecureOpen(a,b,c,d)
#define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->SendChatMessage(a,b,c,d)
#define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->SetGroupConnectionSettings(a,b,c)
#define IDirectPlay3_StartSession(p,a,b) (p)->StartSession(a,b)
#define IDirectPlay3_GetGroupFlags(p,a,b) (p)->GetGroupFlags(a,b)
#define IDirectPlay3_GetGroupParent(p,a,b) (p)->GetGroupParent(a,b)
#define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->GetPlayerAccount(a,b,c,d)
#define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->GetPlayerFlags(a,b)
#endif
/****************************************************************************
*
* EnumConnections API flags
*
****************************************************************************/
/*
* Enumerate Service Providers
*/
#define DPCONNECTION_DIRECTPLAY 0x00000001
/*
* Enumerate Lobby Providers
*/
#define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002
/****************************************************************************
*
* EnumPlayers API flags
*
****************************************************************************/
/*
* Enumerate all players in the current session
*/
#define DPENUMPLAYERS_ALL 0x00000000
#define DPENUMGROUPS_ALL DPENUMPLAYERS_ALL
/*
* Enumerate only local (created by this application) players
* or groups
*/
#define DPENUMPLAYERS_LOCAL 0x00000008
#define DPENUMGROUPS_LOCAL DPENUMPLAYERS_LOCAL
/*
* Enumerate only remote (non-local) players
* or groups
*/
#define DPENUMPLAYERS_REMOTE 0x00000010
#define DPENUMGROUPS_REMOTE DPENUMPLAYERS_REMOTE
/*
* Enumerate groups along with the players
*/
#define DPENUMPLAYERS_GROUP 0x00000020
/*
* Enumerate players or groups in another session
* (must supply lpguidInstance)
*/
#define DPENUMPLAYERS_SESSION 0x00000080
#define DPENUMGROUPS_SESSION DPENUMPLAYERS_SESSION
/*
* Enumerate server players
*/
#define DPENUMPLAYERS_SERVERPLAYER 0x00000100
/*
* Enumerate spectator players
*/
#define DPENUMPLAYERS_SPECTATOR 0x00000200
/*
* Enumerate shortcut groups
*/
#define DPENUMGROUPS_SHORTCUT 0x00000400
/*
* Enumerate staging area groups
*/
#define DPENUMGROUPS_STAGINGAREA 0x00000800
/****************************************************************************
*
* CreatePlayer API flags
*
****************************************************************************/
/*
* This flag indicates that this player should be designated
* the server player. The app should specify this at CreatePlayer.
*/
#define DPPLAYER_SERVERPLAYER DPENUMPLAYERS_SERVERPLAYER
/*
* This flag indicates that this player should be designated
* a spectator. The app should specify this at CreatePlayer.
*/
#define DPPLAYER_SPECTATOR DPENUMPLAYERS_SPECTATOR
/*
* This flag indicates that this player was created locally.
* (returned from GetPlayerFlags)
*/
#define DPPLAYER_LOCAL DPENUMPLAYERS_LOCAL
/****************************************************************************
*
* CreateGroup API flags
*
****************************************************************************/
/*
* This flag indicates that the StartSession can be called on the group.
* The app should specify this at CreateGroup, or CreateGroupInGroup.
*/
#define DPGROUP_STAGINGAREA DPENUMGROUPS_STAGINGAREA
/*
* This flag indicates that this group was created locally.
* (returned from GetGroupFlags)
*/
#define DPGROUP_LOCAL DPENUMGROUPS_LOCAL
/****************************************************************************
*
* EnumSessions API flags
*
****************************************************************************/
/*
* Enumerate sessions which can be joined
*/
#define DPENUMSESSIONS_AVAILABLE 0x00000001
/*
* Enumerate all sessions even if they can't be joined.
*/
#define DPENUMSESSIONS_ALL 0x00000002
/*
* Start an asynchronous enum sessions
*/
#define DPENUMSESSIONS_ASYNC 0x00000010
/*
* Stop an asynchronous enum sessions
*/
#define DPENUMSESSIONS_STOPASYNC 0x00000020
/*
* Enumerate sessions even if they require a password
*/
#define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040
/*
* Return status about progress of enumeration instead of
* showing any status dialogs.
*/
#define DPENUMSESSIONS_RETURNSTATUS 0x00000080
/****************************************************************************
*
* GetCaps and GetPlayerCaps API flags
*
****************************************************************************/
/*
* The latency returned should be for guaranteed message sending.
* Default is non-guaranteed messaging.
*/
#define DPGETCAPS_GUARANTEED 0x00000001
/****************************************************************************
*
* GetGroupData, GetPlayerData API flags
* Remote and local Group/Player data is maintained separately.
* Default is DPGET_REMOTE.
*
****************************************************************************/
/*
* Get the remote data (set by any DirectPlay object in
* the session using DPSET_REMOTE)
*/
#define DPGET_REMOTE 0x00000000
/*
* Get the local data (set by this DirectPlay object
* using DPSET_LOCAL)
*/
#define DPGET_LOCAL 0x00000001
/****************************************************************************
*
* Open API flags
*
****************************************************************************/
/*
* Join the session that is described by the DPSESSIONDESC2 structure
*/
#define DPOPEN_JOIN 0x00000001
/*
* Create a new session as described by the DPSESSIONDESC2 structure
*/
#define DPOPEN_CREATE 0x00000002
/*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -