📄 directplay8.pas
字号:
CLSID_DirectPlay8LobbiedApplication : TGUID = '{667955AD-6B3B-43ca-B949-BC69B5BAFF7F}';
CLSID_DirectPlay8LobbyClient : TGUID = '{3B2B6775-70B6-45af-8DEA-A209C69559F3}';
(****************************************************************************
*
* DirectPlay8Lobby Create
*
****************************************************************************)
(*)
* This function is no longer supported. It is recommended that CoCreateInstance be used to create
* DirectPlay8 lobby objects.
(*)
{$IFDEF DX8}
var
DirectPlay8LobbyCreate : function (const pcIID: TGUID; out ppvInterface;
pUnknown: IUnknown): HResult; stdcall;
{$ENDIF}
(*==========================================================================;
*
* Copyright (C) 1998-2000 Microsoft Corporation. All Rights Reserved.
*
* File: DPlay8.h
* Content: DirectPlay8 include file
*
***************************************************************************)
(****************************************************************************
*
* DirectPlay8 Message Identifiers
*
****************************************************************************)
const
DPN_MSGID_OFFSET = $FFFF0000;
DPN_MSGID_ADD_PLAYER_TO_GROUP = DPN_MSGID_OFFSET or $0001;
DPN_MSGID_APPLICATION_DESC = DPN_MSGID_OFFSET or $0002;
DPN_MSGID_ASYNC_OP_COMPLETE = DPN_MSGID_OFFSET or $0003;
DPN_MSGID_CLIENT_INFO = DPN_MSGID_OFFSET or $0004;
DPN_MSGID_CONNECT_COMPLETE = DPN_MSGID_OFFSET or $0005;
DPN_MSGID_CREATE_GROUP = DPN_MSGID_OFFSET or $0006;
DPN_MSGID_CREATE_PLAYER = DPN_MSGID_OFFSET or $0007;
DPN_MSGID_DESTROY_GROUP = DPN_MSGID_OFFSET or $0008;
DPN_MSGID_DESTROY_PLAYER = DPN_MSGID_OFFSET or $0009;
DPN_MSGID_ENUM_HOSTS_QUERY = DPN_MSGID_OFFSET or $000a;
DPN_MSGID_ENUM_HOSTS_RESPONSE = DPN_MSGID_OFFSET or $000b;
DPN_MSGID_GROUP_INFO = DPN_MSGID_OFFSET or $000c;
DPN_MSGID_HOST_MIGRATE = DPN_MSGID_OFFSET or $000d;
DPN_MSGID_INDICATE_CONNECT = DPN_MSGID_OFFSET or $000e;
DPN_MSGID_INDICATED_CONNECT_ABORTED = DPN_MSGID_OFFSET or $000f;
DPN_MSGID_PEER_INFO = DPN_MSGID_OFFSET or $0010;
DPN_MSGID_RECEIVE = DPN_MSGID_OFFSET or $0011;
DPN_MSGID_REMOVE_PLAYER_FROM_GROUP = DPN_MSGID_OFFSET or $0012;
DPN_MSGID_RETURN_BUFFER = DPN_MSGID_OFFSET or $0013;
DPN_MSGID_SEND_COMPLETE = DPN_MSGID_OFFSET or $0014;
DPN_MSGID_SERVER_INFO = DPN_MSGID_OFFSET or $0015;
DPN_MSGID_TERMINATE_SESSION = DPN_MSGID_OFFSET or $0016;
(****************************************************************************
*
* DirectPlay8 Constants
*
****************************************************************************)
DPNID_ALL_PLAYERS_GROUP = 0;
//
// DESTROY_GROUP reasons
//
DPNDESTROYGROUPREASON_NORMAL = $0001;
DPNDESTROYGROUPREASON_AUTODESTRUCTED = $0002;
DPNDESTROYGROUPREASON_SESSIONTERMINATED = $0003;
//
// DESTROY_PLAYER reasons
//
DPNDESTROYPLAYERREASON_NORMAL = $0001;
DPNDESTROYPLAYERREASON_CONNECTIONLOST = $0002;
DPNDESTROYPLAYERREASON_SESSIONTERMINATED = $0003;
DPNDESTROYPLAYERREASON_HOSTDESTROYEDPLAYER = $0004;
(****************************************************************************
*
* DirectPlay8 Flags
*
****************************************************************************)
//
// Asynchronous operation flags (For Async Ops)
//
DPNOP_SYNC = $80000000;
//
// Add player to group flags (For AddPlayerToGroup)
//
DPNADDPLAYERTOGROUP_SYNC = DPNOP_SYNC;
//
// Cancel flags
//
DPNCANCEL_CONNECT = $0001;
DPNCANCEL_ENUM = $0002;
DPNCANCEL_SEND = $0004;
DPNCANCEL_ALL_OPERATIONS = $8000;
//
// Connect flags (For Connect)
//
DPNCONNECT_SYNC = DPNOP_SYNC;
DPNCONNECT_OKTOQUERYFORADDRESSING = $0001;
//
// Create group flags (For CreateGroup)
//
DPNCREATEGROUP_SYNC = DPNOP_SYNC;
//
// Destroy group flags (For DestroyGroup)
//
DPNDESTROYGROUP_SYNC = DPNOP_SYNC;
//
// Enumerate clients and groups flags (For EnumPlayersAndGroups)
//
DPNENUM_PLAYERS = $0001;
DPNENUM_GROUPS = $0010;
//
// Enum hosts flags (For EnumHosts)
//
DPNENUMHOSTS_SYNC = DPNOP_SYNC;
DPNENUMHOSTS_OKTOQUERYFORADDRESSING = $0001;
DPNENUMHOSTS_NOBROADCASTFALLBACK = $0002;
//
// Enum service provider flags (For EnumSP)
//
DPNENUMSERVICEPROVIDERS_ALL = $0001;
//
// Get send queue info flags (For GetSendQueueInfo)
//
DPNGETSENDQUEUEINFO_PRIORITY_NORMAL = $0001;
DPNGETSENDQUEUEINFO_PRIORITY_HIGH = $0002;
DPNGETSENDQUEUEINFO_PRIORITY_LOW = $0004;
//
// Group information flags (For Group Info)
//
DPNGROUP_AUTODESTRUCT = $0001;
//
// Host flags (For Host)
//
DPNHOST_OKTOQUERYFORADDRESSING = $0001;
//
// Set info
//
DPNINFO_NAME = $0001;
DPNINFO_DATA = $0002;
//
// Initialize flags (For Initialize)
//
DPNINITIALIZE_DISABLEPARAMVAL = $0001;
//
// Register Lobby flags
//
DPNLOBBY_REGISTER = $0001;
DPNLOBBY_UNREGISTER = $0002;
//
// Player information flags (For Player Info / Player Messages)
//
DPNPLAYER_LOCAL = $0002;
DPNPLAYER_HOST = $0004;
//
// Remove player from group flags (For RemovePlayerFromGroup)
//
DPNREMOVEPLAYERFROMGROUP_SYNC = DPNOP_SYNC;
//
// Send flags (For Send/SendTo)
//
DPNSEND_SYNC = DPNOP_SYNC;
DPNSEND_NOCOPY = $0001;
DPNSEND_NOCOMPLETE = $0002;
DPNSEND_COMPLETEONPROCESS = $0004;
DPNSEND_GUARANTEED = $0008;
DPNSEND_NONSEQUENTIAL = $0010;
DPNSEND_NOLOOPBACK = $0020;
DPNSEND_PRIORITY_LOW = $0040;
DPNSEND_PRIORITY_HIGH = $0080;
//
// Session Flags (for DPN_APPLICATION_DESC)
//
DPNSESSION_CLIENT_SERVER = $0001;
DPNSESSION_MIGRATE_HOST = $0004;
DPNSESSION_NODPNSVR = $0040;
DPNSESSION_REQUIREPASSWORD = $0080;
//
// Set client info flags (For SetClientInfo)
//
DPNSETCLIENTINFO_SYNC = DPNOP_SYNC;
//
// Set group info flags (For SetGroupInfo)
//
DPNSETGROUPINFO_SYNC = DPNOP_SYNC;
//
// Set peer info flags (For SetPeerInfo)
//
DPNSETPEERINFO_SYNC = DPNOP_SYNC;
//
// Set server info flags (For SetServerInfo)
//
DPNSETSERVERINFO_SYNC = DPNOP_SYNC;
//
// SP capabilities flags
//
DPNSPCAPS_SUPPORTSDPNSRV = $0001;
DPNSPCAPS_SUPPORTSBROADCAST = $0002;
DPNSPCAPS_SUPPORTSALLADAPTERS = $0004;
(****************************************************************************
*
* DirectPlay8 Structures (Non-Message)
*
****************************************************************************)
type
//
// Application description
//
{ PDPN_Application_Desc = ^TDPN_Application_Desc;
TDPN_Application_Desc = packed record
dwSize : DWORD; // Size of this structure
dwFlags : DWORD; // Flags (DPNSESSION_...)
guidInstance : TGUID; // Instance GUID
guidApplication : TGUID; // Application GUID
dwMaxPlayers : DWORD; // Maximum # of players allowed (0=no limit)
dwCurrentPlayers : DWORD; // Current # of players allowed
pwszSessionName : PWChar; // Name of the session
pwszPassword : PWChar; // Password for the session
pvReservedData : Pointer;
dwReservedDataSize : DWORD;
pvApplicationReservedData : Pointer;
dwApplicationReservedDataSize : DWORD;
end; }
//
// Generic Buffer Description
//
PDPN_Buffer_Desc = ^TDPN_Buffer_Desc;
TDPN_Buffer_Desc = packed record
dwBufferSize : DWORD;
pBufferData : PByte;
end;
PBufferDesc = ^TBufferDesc;
TBufferDesc = TDPN_Buffer_Desc;
//
// DirectPlay8 capabilities
//
PDPN_Caps = ^TDPN_Caps;
TDPN_Caps = packed record
dwSize : DWORD; // Size of this structure
dwFlags : DWORD; // Flags
dwConnectTimeout : DWORD; // ms before a connect request times out
dwConnectRetries : DWORD; // # of times to attempt the connection
dwTimeoutUntilKeepAlive : DWORD; // ms of inactivity before a keep alive is sent
end;
//
// Connection Statistics information
//
PDPN_Connection_Info = ^TDPN_Connection_Info;
TDPN_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;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -