📄 dplay8.h
字号:
typedef struct _DPN_GROUP_INFO
{
DWORD dwSize; // size of this structure
DWORD dwInfoFlags; // information contained
PWSTR pwszName; // Unicode Name
PVOID pvData; // data block
DWORD dwDataSize; // size in BYTES of data block
DWORD dwGroupFlags; // group flags (DPNGROUP_...)
} DPN_GROUP_INFO, *PDPN_GROUP_INFO;
//
// Player information structure
//
typedef struct _DPN_PLAYER_INFO
{
DWORD dwSize; // size of this structure
DWORD dwInfoFlags; // information contained
PWSTR pwszName; // Unicode Name
PVOID pvData; // data block
DWORD dwDataSize; // size in BYTES of data block
DWORD dwPlayerFlags; // player flags (DPNPLAYER_...)
} DPN_PLAYER_INFO, *PDPN_PLAYER_INFO;
typedef struct _DPN_SECURITY_CREDENTIALS DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS;
typedef struct _DPN_SECURITY_DESC DPN_SECURITY_DESC, *PDPN_SECURITY_DESC;
//
// Service provider & adapter enumeration structure
//
typedef struct _DPN_SERVICE_PROVIDER_INFO
{
DWORD dwFlags;
GUID guid; // SP Guid
WCHAR *pwszName; // Friendly Name
PVOID pvReserved;
DWORD dwReserved;
} DPN_SERVICE_PROVIDER_INFO, *PDPN_SERVICE_PROVIDER_INFO;
//
// Service provider caps structure
//
typedef struct _DPN_SP_CAPS
{
DWORD dwSize; // Size of this structure
DWORD dwFlags; // Flags (DPNSPCAPS_...)
DWORD dwNumThreads; // # of worker threads to use
DWORD dwDefaultEnumCount; // default # of enum requests
DWORD dwDefaultEnumRetryInterval; // default ms between enum requests
DWORD dwDefaultEnumTimeout; // default enum timeout
DWORD dwMaxEnumPayloadSize; // maximum size in bytes for enum payload data
DWORD dwBuffersPerThread; // number of receive buffers per thread
DWORD dwSystemBufferSize; // amount of buffering to do in addition to posted receive buffers
} DPN_SP_CAPS, *PDPN_SP_CAPS;
/****************************************************************************
*
* IDirectPlay8 message handler call back structures
*
****************************************************************************/
//
// Add player to group structure for message handler
// (DPN_MSGID_ADD_PLAYER_TO_GROUP)
//
typedef struct _DPNMSG_ADD_PLAYER_TO_GROUP
{
DWORD dwSize; // Size of this structure
DPNID dpnidGroup; // DPNID of group
PVOID pvGroupContext; // Group context value
DPNID dpnidPlayer; // DPNID of added player
PVOID pvPlayerContext; // Player context value
} DPNMSG_ADD_PLAYER_TO_GROUP, *PDPNMSG_ADD_PLAYER_TO_GROUP;
//
// Async operation completion structure for message handler
// (DPN_MSGID_ASYNC_OP_COMPLETE)
//
typedef struct _DPNMSG_ASYNC_OP_COMPLETE
{
DWORD dwSize; // Size of this structure
DPNHANDLE hAsyncOp; // DirectPlay8 async operation handle
PVOID pvUserContext; // User context supplied
HRESULT hResultCode; // HRESULT of operation
} DPNMSG_ASYNC_OP_COMPLETE, *PDPNMSG_ASYNC_OP_COMPLETE;
//
// Client info structure for message handler
// (DPN_MSGID_CLIENT_INFO)
//
typedef struct _DPNMSG_CLIENT_INFO
{
DWORD dwSize; // Size of this structure
DPNID dpnidClient; // DPNID of client
PVOID pvPlayerContext; // Player context value
} DPNMSG_CLIENT_INFO, *PDPNMSG_CLIENT_INFO;
//
// Connect complete structure for message handler
// (DPN_MSGID_CONNECT_COMPLETE)
//
typedef struct _DPNMSG_CONNECT_COMPLETE
{
DWORD dwSize; // Size of this structure
DPNHANDLE hAsyncOp; // DirectPlay8 Async operation handle
PVOID pvUserContext; // User context supplied at Connect
HRESULT hResultCode; // HRESULT of connection attempt
PVOID pvApplicationReplyData; // Connection reply data from Host/Server
DWORD dwApplicationReplyDataSize; // Size (in bytes) of pvApplicationReplyData
// Fields added for DirectX 9
DPNID dpnidLocal; // DPNID of local player
} DPNMSG_CONNECT_COMPLETE, *PDPNMSG_CONNECT_COMPLETE;
//
// Create group structure for message handler
// (DPN_MSGID_CREATE_GROUP)
//
typedef struct _DPNMSG_CREATE_GROUP
{
DWORD dwSize; // Size of this structure
DPNID dpnidGroup; // DPNID of new group
DPNID dpnidOwner; // Owner of newgroup
PVOID pvGroupContext; // Group context value
// Fields added for DirectX 9
PVOID pvOwnerContext; // Owner context value
} DPNMSG_CREATE_GROUP, *PDPNMSG_CREATE_GROUP;
//
// Create player structure for message handler
// (DPN_MSGID_CREATE_PLAYER)
//
typedef struct _DPNMSG_CREATE_PLAYER
{
DWORD dwSize; // Size of this structure
DPNID dpnidPlayer; // DPNID of new player
PVOID pvPlayerContext; // Player context value
} DPNMSG_CREATE_PLAYER, *PDPNMSG_CREATE_PLAYER;
//
// Destroy group structure for message handler
// (DPN_MSGID_DESTROY_GROUP)
//
typedef struct _DPNMSG_DESTROY_GROUP
{
DWORD dwSize; // Size of this structure
DPNID dpnidGroup; // DPNID of destroyed group
PVOID pvGroupContext; // Group context value
DWORD dwReason; // Information only
} DPNMSG_DESTROY_GROUP, *PDPNMSG_DESTROY_GROUP;
//
// Destroy player structure for message handler
// (DPN_MSGID_DESTROY_PLAYER)
//
typedef struct _DPNMSG_DESTROY_PLAYER
{
DWORD dwSize; // Size of this structure
DPNID dpnidPlayer; // DPNID of leaving player
PVOID pvPlayerContext; // Player context value
DWORD dwReason; // Information only
} DPNMSG_DESTROY_PLAYER, *PDPNMSG_DESTROY_PLAYER;
//
// Enumeration request received structure for message handler
// (DPN_MSGID_ENUM_HOSTS_QUERY)
//
typedef struct _DPNMSG_ENUM_HOSTS_QUERY
{
DWORD dwSize; // Size of this structure.
IDirectPlay8Address *pAddressSender; // Address of client who sent the request
IDirectPlay8Address *pAddressDevice; // Address of device request was received on
PVOID pvReceivedData; // Request data (set on client)
DWORD dwReceivedDataSize; // Request data size (set on client)
DWORD dwMaxResponseDataSize; // Max allowable size of enum response
PVOID pvResponseData; // Optional query repsonse (user set)
DWORD dwResponseDataSize; // Optional query response size (user set)
PVOID pvResponseContext; // Optional query response context (user set)
} DPNMSG_ENUM_HOSTS_QUERY, *PDPNMSG_ENUM_HOSTS_QUERY;
//
// Enumeration response received structure for message handler
// (DPN_MSGID_ENUM_HOSTS_RESPONSE)
//
typedef struct _DPNMSG_ENUM_HOSTS_RESPONSE
{
DWORD dwSize; // Size of this structure
IDirectPlay8Address *pAddressSender; // Address of host who responded
IDirectPlay8Address *pAddressDevice; // Device response was received on
const DPN_APPLICATION_DESC *pApplicationDescription; // Application description for the session
PVOID pvResponseData; // Optional response data (set on host)
DWORD dwResponseDataSize; // Optional response data size (set on host)
PVOID pvUserContext; // Context value supplied for enumeration
DWORD dwRoundTripLatencyMS; // Round trip latency in MS
} DPNMSG_ENUM_HOSTS_RESPONSE, *PDPNMSG_ENUM_HOSTS_RESPONSE;
//
// Group info structure for message handler
// (DPN_MSGID_GROUP_INFO)
//
typedef struct _DPNMSG_GROUP_INFO
{
DWORD dwSize; // Size of this structure
DPNID dpnidGroup; // DPNID of group
PVOID pvGroupContext; // Group context value
} DPNMSG_GROUP_INFO, *PDPNMSG_GROUP_INFO;
//
// Migrate host structure for message handler
// (DPN_MSGID_HOST_MIGRATE)
//
typedef struct _DPNMSG_HOST_MIGRATE
{
DWORD dwSize; // Size of this structure
DPNID dpnidNewHost; // DPNID of new Host player
PVOID pvPlayerContext; // Player context value
} DPNMSG_HOST_MIGRATE, *PDPNMSG_HOST_MIGRATE;
//
// Indicate connect structure for message handler
// (DPN_MSGID_INDICATE_CONNECT)
//
typedef struct _DPNMSG_INDICATE_CONNECT
{
DWORD dwSize; // Size of this structure
PVOID pvUserConnectData; // Connecting player data
DWORD dwUserConnectDataSize; // Size (in bytes) of pvUserConnectData
PVOID pvReplyData; // Connection reply data
DWORD dwReplyDataSize; // Size (in bytes) of pvReplyData
PVOID pvReplyContext; // Buffer context for pvReplyData
PVOID pvPlayerContext; // Player context preset
IDirectPlay8Address *pAddressPlayer; // Address of connecting player
IDirectPlay8Address *pAddressDevice; // Address of device receiving connect attempt
} DPNMSG_INDICATE_CONNECT, *PDPNMSG_INDICATE_CONNECT;
//
// Indicated connect aborted structure for message handler
// (DPN_MSGID_INDICATED_CONNECT_ABORTED)
//
typedef struct _DPNMSG_INDICATED_CONNECT_ABORTED
{
DWORD dwSize; // Size of this structure
PVOID pvPlayerContext; // Player context preset from DPNMSG_INDICATE_CONNECT
} DPNMSG_INDICATED_CONNECT_ABORTED, *PDPNMSG_INDICATED_CONNECT_ABORTED;
//
// Peer info structure for message handler
// (DPN_MSGID_PEER_INFO)
//
typedef struct _DPNMSG_PEER_INFO
{
DWORD dwSize; // Size of this structure
DPNID dpnidPeer; // DPNID of peer
PVOID pvPlayerContext; // Player context value
} DPNMSG_PEER_INFO, *PDPNMSG_PEER_INFO;
//
// Receive structure for message handler
// (DPN_MSGID_RECEIVE)
//
typedef struct _DPNMSG_RECEIVE
{
DWORD dwSize; // Size of this structure
DPNID dpnidSender; // DPNID of sending player
PVOID pvPlayerContext; // Player context value of sending player
PBYTE pReceiveData; // Received data
DWORD dwReceiveDataSize; // Size (in bytes) of pReceiveData
DPNHANDLE hBufferHandle; // Buffer handle for pReceiveData
// Fields added for DirectX 9
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -