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

📄 directplay8.pas

📁 3D GameStudio 的Delphi开发包
💻 PAS
📖 第 1 页 / 共 5 页
字号:
    dwMaxRecvMsgSize: DWORD;			// maximum size in bytes of message that can be received
    dwNumSendRetries: DWORD;			// maximum number of send retries before link is considered dead
    dwMaxSendRetryInterval: DWORD;		// maximum period in msec between send retries
    dwDropThresholdRate: DWORD;			// percentage of dropped packets before throttling
    dwThrottleRate: DWORD;				// percentage amount to reduce send window when throttling
    dwNumHardDisconnectSends: DWORD;	// number of hard disconnect frames to send when close immediate flag is specified
    dwMaxHardDisconnectPeriod: DWORD;	// maximum period between hard disconnect sends
  end;
  {$EXTERNALSYM _DPN_CAPS_EX}
  DPN_CAPS_EX = _DPN_CAPS_EX;
  {$EXTERNALSYM DPN_CAPS_EX}
  TDPNCapsEx = _DPN_CAPS_EX;

  // Connection Statistics information

  PDPNConnectionInfo = ^TDPNConnectionInfo;
  _DPN_CONNECTION_INFO = packed record
    dwSize: DWORD;
    dwRoundTripLatencyMS: DWORD;
    dwThroughputBPS: DWORD;
    dwPeakThroughputBPS: DWORD;

    dwBytesSentGuaranteed: DWORD;
    dwPacketsSentGuaranteed: DWORD;
    dwBytesSentNonGuaranteed: DWORD;
    dwPacketsSentNonGuaranteed: DWORD;

    dwBytesRetried: DWORD;    // Guaranteed only
    dwPacketsRetried: DWORD;  // Guaranteed only
    dwBytesDropped: DWORD;    // Non Guaranteed only
    dwPacketsDropped: DWORD;  // Non Guaranteed only

    dwMessagesTransmittedHighPriority: DWORD;
    dwMessagesTimedOutHighPriority: DWORD;
    dwMessagesTransmittedNormalPriority: DWORD;
    dwMessagesTimedOutNormalPriority: DWORD;
    dwMessagesTransmittedLowPriority: DWORD;
    dwMessagesTimedOutLowPriority: DWORD;

    dwBytesReceivedGuaranteed: DWORD;
    dwPacketsReceivedGuaranteed: DWORD;
    dwBytesReceivedNonGuaranteed: DWORD;
    dwPacketsReceivedNonGuaranteed: DWORD;
    dwMessagesReceived: DWORD;
  end;
  {$EXTERNALSYM _DPN_CONNECTION_INFO}
  DPN_CONNECTION_INFO = _DPN_CONNECTION_INFO;
  {$EXTERNALSYM DPN_CONNECTION_INFO}
  TDPNConnectionInfo = _DPN_CONNECTION_INFO;


  //
  // Group information strucutre
  //
  PDPNGroupInfo = ^TDPNGroupInfo;
  _DPN_GROUP_INFO = packed record
    dwSize: DWORD;          // size of this structure
    dwInfoFlags: DWORD;     // information contained
    pwszName: PWideChar;    // Unicode Name
    pvData: Pointer;        // data block
    dwDataSize: DWORD;      // size in BYTES of data block
    dwGroupFlags: DWORD;    // group flags (DPNGROUP_...)
  end;
  {$EXTERNALSYM _DPN_GROUP_INFO}
  DPN_GROUP_INFO = _DPN_GROUP_INFO;
  {$EXTERNALSYM DPN_GROUP_INFO}
  TDPNGroupInfo = _DPN_GROUP_INFO;

  //
  // Player information structure
  //
  PDPNPlayerInfo = ^TDPNPlayerInfo;
  _DPN_PLAYER_INFO = packed record
    dwSize: DWORD;          // size of this structure
    dwInfoFlags: DWORD;     // information contained
    pwszName: PWideChar;    // Unicode Name
    pvData: Pointer;        // data block
    dwDataSize: DWORD;      // size in BYTES of data block
    dwPlayerFlags: DWORD;   // player flags (DPNPLAYER_...)
  end;
  {$EXTERNALSYM _DPN_PLAYER_INFO}
  DPN_PLAYER_INFO = _DPN_PLAYER_INFO;
  {$EXTERNALSYM DPN_PLAYER_INFO}
  TDPNPlayerInfo = _DPN_PLAYER_INFO;

  PDPNSecurityCredentials = ^TDPNSecurityCredentials;
  _DPN_SECURITY_CREDENTIALS = record
  end;
  {$EXTERNALSYM _DPN_SECURITY_CREDENTIALS}
  DPN_SECURITY_CREDENTIALS = _DPN_SECURITY_CREDENTIALS;
  {$EXTERNALSYM DPN_SECURITY_CREDENTIALS}
  TDPNSecurityCredentials = _DPN_SECURITY_CREDENTIALS;

  PDPNSecurityDesc = ^TDPNSecurityDesc;
  _DPN_SECURITY_DESC = record
  end;
  {$EXTERNALSYM _DPN_SECURITY_DESC}
  DPN_SECURITY_DESC = _DPN_SECURITY_DESC;
  {$EXTERNALSYM DPN_SECURITY_DESC}
  TDPNSecurityDesc = _DPN_SECURITY_DESC;

  //
  // Service provider & adapter enumeration structure
  //
  PDPNServiceProviderInfo = ^TDPNServiceProviderInfo;
  _DPN_SERVICE_PROVIDER_INFO = packed record
     dwFlags: DWORD;
     guid: TGUID;            // SP Guid
     pwszName: PWideChar;    // Friendly Name
     pvReserved: Pointer;
     dwReserved: DWORD;
  end;
  {$EXTERNALSYM _DPN_SERVICE_PROVIDER_INFO}
  DPN_SERVICE_PROVIDER_INFO = _DPN_SERVICE_PROVIDER_INFO;
  {$EXTERNALSYM DPN_SERVICE_PROVIDER_INFO}
  TDPNServiceProviderInfo = _DPN_SERVICE_PROVIDER_INFO;

  //
  // Service provider caps structure
  //
  PDPNSpCaps = ^TDPNSpCaps;
  _DPN_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;
  {$EXTERNALSYM _DPN_SP_CAPS}
  DPN_SP_CAPS = _DPN_SP_CAPS;
  {$EXTERNALSYM DPN_SP_CAPS}
  TDPNSpCaps = _DPN_SP_CAPS;


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

  //
  // Add player to group strucutre for message handler
  // (DPN_MSGID_ADD_PLAYER_TO_GROUP)
  //
  PDPNMsgAddPlayerToGroup = ^TDPNMsgAddPlayerToGroup;
  _DPNMSG_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;
  {$EXTERNALSYM _DPNMSG_ADD_PLAYER_TO_GROUP}
  DPNMSG_ADD_PLAYER_TO_GROUP = _DPNMSG_ADD_PLAYER_TO_GROUP;
  {$EXTERNALSYM DPNMSG_ADD_PLAYER_TO_GROUP}
  TDPNMsgAddPlayerToGroup = _DPNMSG_ADD_PLAYER_TO_GROUP;

  //
  // Async operation completion structure for message handler
  // (DPN_MSGID_ASYNC_OP_COMPLETE)
  //
  PDPNMsgAsyncOpComplete = ^TDPNMsgAsyncOpComplete;
  _DPNMSG_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;
  {$EXTERNALSYM _DPNMSG_ASYNC_OP_COMPLETE}
  DPNMSG_ASYNC_OP_COMPLETE = _DPNMSG_ASYNC_OP_COMPLETE;
  {$EXTERNALSYM DPNMSG_ASYNC_OP_COMPLETE}
  TDPNMsgAsyncOpComplete = _DPNMSG_ASYNC_OP_COMPLETE;

  //
  // Client info structure for message handler
  // (DPN_MSGID_CLIENT_INFO)
  //
  PDPNMsgClientInfo = ^TDPNMsgClientInfo;
  _DPNMSG_CLIENT_INFO = packed record
    dwSize: DWORD;            // Size of this structure
    dpnidClient: TDPNID;      // DPNID of client
    pvPlayerContext: Pointer; // Player context value
  end;
  {$EXTERNALSYM _DPNMSG_CLIENT_INFO}
  DPNMSG_CLIENT_INFO = _DPNMSG_CLIENT_INFO;
  {$EXTERNALSYM DPNMSG_CLIENT_INFO}
  TDPNMsgClientInfo = _DPNMSG_CLIENT_INFO;

  //
  // Connect complete structure for message handler
  // (DPN_MSGID_CONNECT_COMPLETE)
  //
  PDPNMsgConnectComplete = ^TDPNMsgConnectComplete;
  _DPNMSG_CONNECT_COMPLETE = packed record
    dwSize: DWORD;                     // 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

    // Fields added for DirectX 9
    dpnidLocal: TDPNID;                // DPNID of local player
  end;
  {$EXTERNALSYM _DPNMSG_CONNECT_COMPLETE}
  DPNMSG_CONNECT_COMPLETE = _DPNMSG_CONNECT_COMPLETE;
  {$EXTERNALSYM DPNMSG_CONNECT_COMPLETE}
  TDPNMsgConnectComplete = _DPNMSG_CONNECT_COMPLETE;

  //
  // Create group structure for message handler
  // (DPN_MSGID_CREATE_GROUP)
  //
  PDPNMsgCreateGroup = ^TDPNMsgCreateGroup;
  _DPNMSG_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

    // Fields added for DirectX 9
    pvOwnerContext: Pointer; // Owner context value
  end;
  {$EXTERNALSYM _DPNMSG_CREATE_GROUP}
  DPNMSG_CREATE_GROUP = _DPNMSG_CREATE_GROUP;
  {$EXTERNALSYM DPNMSG_CREATE_GROUP}
  TDPNMsgCreateGroup = _DPNMSG_CREATE_GROUP;

  //
  // Create player structure for message handler
  // (DPN_MSGID_CREATE_PLAYER)
  //
  PDPNMsgCreatePlayer = ^TDPNMsgCreatePlayer;
  _DPNMSG_CREATE_PLAYER = packed record
    dwSize: DWORD;            // Size of this structure
    dpnidPlayer: DPNID;       // DPNID of new player
    pvPlayerContext: Pointer; // Player context value
  end;
  {$EXTERNALSYM _DPNMSG_CREATE_PLAYER}
  DPNMSG_CREATE_PLAYER = _DPNMSG_CREATE_PLAYER;
  {$EXTERNALSYM DPNMSG_CREATE_PLAYER}
  TDPNMsgCreatePlayer = _DPNMSG_CREATE_PLAYER;

  //
  // Destroy group structure for message handler
  // (DPN_MSGID_DESTROY_GROUP)
  //
  PDPNMsgDestroyGroup = ^TDPNMsgDestroyGroup;
  _DPNMSG_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;
  {$EXTERNALSYM _DPNMSG_DESTROY_GROUP}
  DPNMSG_DESTROY_GROUP = _DPNMSG_DESTROY_GROUP;
  {$EXTERNALSYM DPNMSG_DESTROY_GROUP}
  TDPNMsgDestroyGroup = _DPNMSG_DESTROY_GROUP;

  //
  // Destroy player structure for message handler
  // (DPN_MSGID_DESTROY_PLAYER)
  //
  PDPNMsgDestroyPlayer = ^TDPNMsgDestroyPlayer;
  _DPNMSG_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;
  {$EXTERNALSYM _DPNMSG_DESTROY_PLAYER}
  DPNMSG_DESTROY_PLAYER = _DPNMSG_DESTROY_PLAYER;
  {$EXTERNALSYM DPNMSG_DESTROY_PLAYER}
  TDPNMsgDestroyPlayer = _DPNMSG_DESTROY_PLAYER;

  //
  // Enumeration request received structure for message handler
  // (DPN_MSGID_ENUM_HOSTS_QUERY)
  //
  PDPNMsgEnumHostsQuery = ^TDPNMsgEnumHostsQuery;
  _DPNMSG_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;
  {$EXTERNALSYM _DPNMSG_ENUM_HOSTS_QUERY}
  DPNMSG_ENUM_HOSTS_QUERY = _DPNMSG_ENUM_HOSTS_QUERY;
  {$EXTERNALSYM DPNMSG_ENUM_HOSTS_QUERY}
  TDPNMsgEnumHostsQuery = _DPNMSG_ENUM_HOSTS_QUERY;

  //
  // Enumeration response received structure for message handler
  // (DPN_MSGID_ENUM_HOSTS_RESPONSE)
  //
  PDPNMsgEnumHostsResponse = ^TDPNMsgEnumHostsResponse;
  _DPNMSG_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: PDPNApplicationDesc; // 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;
  {$EXTERNALSYM _DPNMSG_ENUM_HOSTS_RESPONSE}
  DPNMSG_ENUM_HOSTS_RESPONSE = _DPNMSG_ENUM_HOSTS_RESPONSE;
  {$EXTERNALSYM DPNMSG_ENUM_HOSTS_RESPONSE}
  TDPNMsgEnumHostsResponse = _DPNMSG_ENUM_HOSTS_RESPONSE;

  //
  // Group info structure for message handler
  // (DPN_MSGID_GROUP_INFO)
  //
  PDPNMsgGroupInfo = ^TDPNMsgGroupInfo;
  _DPNMSG_GROUP_INFO = packed record
    dwSize: DWORD;              // Size of this structure
    dpnidGroup: TDPNID;         // DPNID of group

⌨️ 快捷键说明

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