⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 directplay8.pas

📁 雷神之锤2(Quake2)Delphi源码
💻 PAS
📖 第 1 页 / 共 5 页
字号:
    dwPacketsReceivedNonGuaranteed      : DWORD;
    dwMessagesReceived                  : DWORD;
  end;

//
// Group information strucutre
//
  PDPN_Group_Info = ^TDPN_Group_Info;
  TDPN_Group_Info = packed record
    dwSize       : DWORD;    	// size of this structure
    dwInfoFlags  : DWORD;    	// information contained
    pwszName     : DWORD;    	// Unicode Name
    pvData       : DWORD;    	// data block
    dwDataSize   : DWORD;    	// size in BYTES of data block
    dwGroupFlags : DWORD;    	// group flags (DPNGROUP_...)
  end;

//
// Player information structure
//
  PDPN_Player_Info = ^TDPN_Player_Info;
  TDPN_Player_Info = packed record
    dwSize        : DWORD;	// size of this structure
    dwInfoFlags   : DWORD;	// information contained
    pwszName      : PWChar;	// Unicode Name
    pvData        : Pointer;	// data block
    dwDataSize    : DWORD;	// size in BYTES of data block
    dwPlayerFlags : DWORD;	// player flags (DPNPLAYER_...)
  end;

{typedef struct _DPN_SECURITY_CREDENTIALS	DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS;
typedef struct _DPN_SECURITY_DESC			DPN_SECURITY_DESC, *PDPN_SECURITY_DESC;}

  PDPN_Security_Desc = Pointer;
  PDPN_Security_Credentials = Pointer;

//
// Service provider & adapter enumeration structure
//
  PDPN_Service_Provider_Info = ^TDPN_Service_Provider_Info;
  TDPN_Service_Provider_Info = packed record
    dwFlags    : DWORD;
    guid       : TGUID;		// SP Guid
    pwszName   : PWChar;	// Friendly Name
    pvReserved : Pointer;
    dwReserved : DWORD;
  end;

  PDPN_SP_Caps = ^TDPN_SP_Caps;
  TDPN_SP_Caps = packed record
    dwSize                     : DWORD;	  // Size of this structure
    dwFlags                    : DWORD;	  // Flags ((DPNSPCAPS_...)
    dwNumThreads               : DWORD;	  // # of worker threads to use
    dwDefaultEnumCount         : DWORD;	  // default # of enum requests
    dwDefaultEnumRetryInterval : DWORD;	  // default ms between enum requests
    dwDefaultEnumTimeout       : DWORD;	  // default enum timeout
    dwMaxEnumPayloadSize       : DWORD;	  // maximum size in bytes for enum payload data
    dwBuffersPerThread         : DWORD;	  // number of receive buffers per thread
    dwSystemBufferSize         : DWORD;	  // amount of buffering to do in addition to posted receive buffers
  end;


(****************************************************************************
 *
 * IDirectPlay8 message handler call back structures
 *
 ****************************************************************************)

//
// Add player to group strucutre for message handler
// (DPN_MSGID_ADD_PLAYER_TO_GROUP)
//

  PDPNMsg_Add_Player_To_Group = ^TDPNMsg_Add_Player_To_Group;
  TDPNMsg_Add_Player_To_Group = packed record
    dwSize          : DWORD;	// Size of this structure
    dpnidGroup      : TDPNID;   // DPNID of group
    pvGroupContext  : Pointer;  // Group context value
    dpnidPlayer     : TDPNID;  	// DPNID of added player
    pvPlayerContext : Pointer;	// Player context value
  end;

//
// Async operation completion structure for message handler
// (DPN_MSGID_ASYNC_OP_COMPLETE)
//
  PDPNMsg_ASync_Op_Complete = ^TDPNMsg_ASync_Op_Complete;
  TDPNMsg_ASync_Op_Complete = packed record
    dwSize        : DWORD;	// Size of this structure
    hAsyncOp      : TDPNHandle;	// DirectPlay8 async operation handle
    pvUserContext : Pointer;	// User context supplied
    hResultCode   : HResult;	// HRESULT of operation
  end;

//
// Client info structure for message handler
// (DPN_MSGID_CLIENT_INFO)
//
  PDPNMsg_Client_Info = ^TDPNMsg_Client_Info;
  TDPNMsg_Client_Info = packed record
    dwSize          : DWORD;	// Size of this structure
    dpnidClient     : TDPNID;	// DPNID of client
    pvPlayerContext : Pointer;	// Player context value
  end;

//
// Connect complete structure for message handler
// (DPN_MSGID_CONNECT_COMPLETE)
//
  PDPNMsg_Connect_Complete = ^TDPNMsg_Connect_Complete;
  TDPNMsg_Connect_Complete = packed record
    dwSize                     : Pointer;	// Size of this structure
    hAsyncOp                   : TDPNHandle;	// DirectPlay8 Async operation handle
    pvUserContext              : Pointer;	// User context supplied at Connect
    hResultCode                : HResult;	// HRESULT of connection attempt
    pvApplicationReplyData     : Pointer;       // Connection reply data from Host/Server
    dwApplicationReplyDataSize : DWORD;	        // Size (in bytes) of pvApplicationReplyData
  end;

//
// Create group structure for message handler
// (DPN_MSGID_CREATE_GROUP)
//
  PDPNMsg_Create_Group = ^TDPNMsg_Create_Group;
  TDPNMsg_Create_Group = packed record
    dwSize         : DWORD;	// Size of this structure
    dpnidGroup     : TDPNID;	// DPNID of new group
    dpnidOwner     : TDPNID;	// Owner of newgroup
    pvGroupContext : Pointer;   // Group context value
  end;

//
// Create player structure for message handler
// (DPN_MSGID_CREATE_PLAYER)
//
  PDPNMsg_Create_Player = ^TDPNMsg_Create_Player;
  TDPNMsg_Create_Player = packed record
    dwSize          : DWORD;	// Size of this structure
    dpnidPlayer     : TDPNID;	// DPNID of new player
    pvPlayerContext : Pointer;	// Player context value
  end;

//
// Destroy group structure for message handler
// (DPN_MSGID_DESTROY_GROUP)
//
  PDPNMsg_Destroy_Group = ^TDPNMsg_Destroy_Group;
  TDPNMsg_Destroy_Group = packed record
    dwSize         : DWORD;	// Size of this structure
    dpnidGroup     : TDPNID;	// DPNID of destroyed group
    pvGroupContext : Pointer;	// Group context value
    dwReason       : DWORD;     // Information only
  end;

//
// Destroy player structure for message handler
// (DPN_MSGID_DESTROY_PLAYER)
//
  PDPNMsg_Destroy_Player = ^TDPNMsg_Destroy_Player;
  TDPNMsg_Destroy_Player = packed record
    dwSize          : DWORD;	// Size of this structure
    dpnidPlayer     : TDPNID;   // DPNID of leaving player
    pvPlayerContext : Pointer;	// Player context value
    dwReason        : DWORD; 	// Information only
  end;

//
// Enumeration request received structure for message handler
// (DPN_MSGID_ENUM_HOSTS_QUERY)
//
  PDPNMsg_Enum_Hosts_Query = ^TDPNMsg_Enum_Hosts_Query;
  TDPNMsg_Enum_Hosts_Query = packed record
    dwSize                : DWORD;                 // Size of this structure.
    pAddressSender        : IDirectPlay8Address;   // Address of client who sent the request
    pAddressDevice        : IDirectPlay8Address;   // Address of device request was received on
    pvReceivedData        : Pointer;               // Request data (set on client)
    dwReceivedDataSize    : DWORD;                 // Request data size (set on client)
    dwMaxResponseDataSize : DWORD;	           // Max allowable size of enum response
    pvResponseData        : Pointer;		   // Optional query repsonse (user set)
    dwResponseDataSize    : DWORD;	           // Optional query response size (user set)
    pvResponseContext     : Pointer;	           // Optional query response context (user set)
  end;

//
// Enumeration response received structure for message handler
// (DPN_MSGID_ENUM_HOSTS_RESPONSE)
//
  PDPNMsg_Enum_Hosts_Response = ^TDPNMsg_Enum_Hosts_Response;
  TDPNMsg_Enum_Hosts_Response = packed record
    dwSize                  : DWORD;                  // Size of this structure
    pAddressSender          : IDirectPlay8Address;    // Address of host who responded
    pAddressDevice          : IDirectPlay8Address;    // Device response was received on
    pApplicationDescription : PDPN_Application_Desc;  // Application description for the session
    pvResponseData          : Pointer;                // Optional response data (set on host)
    dwResponseDataSize      : DWORD;                  // Optional response data size (set on host)
    pvUserContext           : Pointer;                // Context value supplied for enumeration
    dwRoundTripLatencyMS    : DWORD;                  // Round trip latency in MS
  end;

//
// Group info structure for message handler
// (DPN_MSGID_GROUP_INFO)
//
  PDPNMsg_Group_Info = ^TDPNMsg_Group_Info;
  TDPNMsg_Group_Info = packed record
    dwSize         : DWORD;    	    // Size of this structure
    dpnidGroup     : TDPNID;   	    // DPNID of group
    pvGroupContext : Pointer;       // Group context value
  end;

//
// Migrate host structure for message handler
// (DPN_MSGID_HOST_MIGRATE)
//
  PDPNMsg_Host_Migrate = ^TDPNMsg_Host_Migrate;
  TDPNMsg_Host_Migrate = packed record
    dwSize          : DWORD;  	    // Size of this structure
    dpnidNewHost    : TDPNID; 	    // DPNID of new Host player
    pvPlayerContext : Pointer;	    // Player context value
  end;

//
// Indicate connect structure for message handler
// (DPN_MSGID_INDICATE_CONNECT)
//
  PDPNMsg_Indicate_Connect = ^TDPNMsg_Indicate_Connect;
  TDPNMsg_Indicate_Connect = packed record
    dwSize                : DWORD;   	         // Size of this structure
    pvUserConnectData     : Pointer; 	         // Connecting player data
    dwUserConnectDataSize : DWORD;	         // Size (in bytes) of pvUserConnectData
    pvReplyData           : Pointer; 	         // Connection reply data
    dwReplyDataSize       : DWORD;             	 // Size (in bytes) of pvReplyData
    pvReplyContext        : Pointer; 	         // Buffer context for pvReplyData
    pvPlayerContext       : Pointer; 	         // Player context preset
    pAddressPlayer        : IDirectPlay8Address; // Address of connecting player
    pAddressDevice        : IDirectPlay8Address; // Address of device receiving connect attempt
  end;

//
// Indicated connect aborted structure for message handler
// (DPN_MSGID_INDICATED_CONNECT_ABORTED)
//
  PDPNMsg_Indicated_Connect_Aborted = ^TDPNMsg_Indicated_Connect_Aborted;
  TDPNMsg_Indicated_Connect_Aborted = packed record
    dwSize          : DWORD;  	// Size of this structure
    pvPlayerContext : Pointer;	// Player context preset from DPNMSG_INDICATE_CONNECT
  end;

//
// Peer info structure for message handler
// (DPN_MSGID_PEER_INFO)
//
  PDPNMsg_Peer_Info = ^TDPNMsg_Peer_Info;
  TDPNMsg_Peer_Info = packed record
    dwSize          : DWORD;        // Size of this structure
    dpnidPeer       : TDPNID;	    // DPNID of peer
    pvPlayerContext : Pointer;	    // Player context value
  end;

//
// Receive structure for message handler
// (DPN_MSGID_RECEIVE)
//
  PDPNMsg_Receive = ^TDPNMsg_Receive;
  TDPNMsg_Receive = packed record
    dwSize            : DWORD;	      	// Size of this structure
    dpnidSender       : TDPNID;		// DPNID of sending player
    pvPlayerContext   : Pointer;	// Player context value of sending player
    pReceiveData      : PBYTE;		// Received data
    dwReceiveDataSize : DWORD;	        // Size (in bytes) of pReceiveData
    hBufferHandle     : TDPNHandle; 	// Buffer handle for pReceiveData
  end;

//
// Remove player from group structure for message handler
// (DPN_MSGID_REMOVE_PLAYER_FROM_GROUP)
//
  PDPNMsg_Remove_Player_From_Group = ^TDPNMsg_Remove_Player_From_Group;
  TDPNMsg_Remove_Player_From_Group = packed record
    dwSize          : DWORD;	      // Size of this structure
    dpnidGroup      : TDPNID;	      // DPNID of group
    pvGroupContext  : Pointer;	      // Group context value
    dpnidPlayer     : TDPNID;	      // DPNID of deleted player
    pvPlayerContext : Pointer;        // Player context value
  end;

//
// Returned buffer structure for message handler
// (DPN_MSGID_RETURN_BUFFER)
//
  PDPNMsg_Return_Buffer = ^TDPNMsg_Return_Buffer;
  TDPNMsg_Return_Buffer = packed record
    dwSize        : DWORD;  	// Size of this structure
    hResultCode   : HResult;	// Return value of operation
    pvBuffer      : Pointer;	// Buffer being returned
    pvUserContext : Pointer;	// Context associated with buffer
  end;

//
// Send complete structure for message handler
// (DPN_MSGID_SEND_COMPLETE)
//
  PDPNMsg_Send_Complete = ^TDPNMsg_Send_Complete;
  TDPNMsg_Send_Complete = packed record
    dwSize        : DWORD;	// Size of this structure
    hAsyncOp      : TDPNHandle; // DirectPlay8 Async operation handle
    pvUserContext : Pointer;  	// User context supplied at Send/SendTo
    hResultCode   : HResult;	// HRESULT of send
    dwSendTime    : DWORD;	// Send time in ms
  end;

//
// Server info structure for message handler
// (DPN_MSGID_SERVER_INFO)
//

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -