DirectPlay8.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:143k
- {******************************************************************************}
- {* *}
- {* Copyright (C) Microsoft Corporation. All Rights Reserved. *}
- {* *}
- {* Files: dpaddr.h dplobby8.h dplay8.h dvoice.h *}
- {* Content: DirectPlay8 include files *}
- {* *}
- {* DirectX 9.0 Delphi adaptation by Alexey Barkovoy *}
- {* E-Mail: clootie@reactor.ru *}
- {* *}
- {* Modified: 27-Apr-2003 *}
- {* *}
- {* Latest version can be downloaded from: *}
- {* http://clootie.narod.ru/delphi *}
- {* *}
- {******************************************************************************}
- { }
- { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
- { }
- { The contents of this file are used with permission, subject to the Mozilla }
- { Public License Version 1.1 (the "License"); you may not use this file except }
- { in compliance with the License. You may obtain a copy of the License at }
- { http://www.mozilla.org/MPL/MPL-1.1.html }
- { }
- { Software distributed under the License is distributed on an "AS IS" basis, }
- { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
- { the specific language governing rights and limitations under the License. }
- { }
- { Alternatively, the contents of this file may be used under the terms of the }
- { GNU Lesser General Public License (the "LGPL License"), in which case the }
- { provisions of the LGPL License are applicable instead of those above. }
- { If you wish to allow use of your version of this file only under the terms }
- { of the LGPL License and not to allow others to use your version of this file }
- { under the MPL, indicate your decision by deleting the provisions above and }
- { replace them with the notice and other provisions required by the LGPL }
- { License. If you do not delete the provisions above, a recipient may use }
- { your version of this file under either the MPL or the LGPL License. }
- { }
- { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
- { }
- {******************************************************************************}
- {$I DirectX.inc}
- unit DirectPlay8;
- interface
- (*$HPPEMIT '#include "dplay8.h"' *)
- (*$HPPEMIT '#include "dplobby8.h"' *)
- (*$HPPEMIT '#include "dvoice.h"' *)
- uses
- Windows, WinSock, DirectSound;
- (*==========================================================================;
- *
- * Copyright (C) 2000-2002 Microsoft Corporation. All Rights Reserved.
- *
- * File: dpaddr.h
- * Content: DirectPlayAddress include file
- ***************************************************************************)
- const
- (****************************************************************************
- *
- * DirectPlay8Address CLSIDs
- *
- ****************************************************************************)
- // {934A9523-A3CA-4bc5-ADA0-D6D95D979421}
- CLSID_DirectPlay8Address: TGUID = '{934a9523-a3ca-4bc5-ada0-d6d95d979421}';
- {$EXTERNALSYM CLSID_DirectPlay8Address}
-
- (****************************************************************************
- *
- * DirectPlay8Address Interface IIDs
- *
- ****************************************************************************)
- type
- DPNAREFIID = TGUID;
- {$EXTERNALSYM DPNAREFIID}
- TDPNARefIID = DPNAREFIID;
- (****************************************************************************
- *
- * DirectPlay8Address Constants
- *
- ****************************************************************************)
- const
- //
- // Asynchronous operation flags
- //
- DPNA_DATATYPE_STRING = $00000001;
- {$EXTERNALSYM DPNA_DATATYPE_STRING}
- DPNA_DATATYPE_DWORD = $00000002;
- {$EXTERNALSYM DPNA_DATATYPE_DWORD}
- DPNA_DATATYPE_GUID = $00000003;
- {$EXTERNALSYM DPNA_DATATYPE_GUID}
- DPNA_DATATYPE_BINARY = $00000004;
- {$EXTERNALSYM DPNA_DATATYPE_BINARY}
- DPNA_DATATYPE_STRING_ANSI = $00000005;
- {$EXTERNALSYM DPNA_DATATYPE_STRING_ANSI}
- DPNA_DPNSVR_PORT = 6073;
- {$EXTERNALSYM DPNA_DPNSVR_PORT}
- DPNA_INDEX_INVALID = $FFFFFFFF;
- {$EXTERNALSYM DPNA_INDEX_INVALID}
- (****************************************************************************
- *
- * DirectPlay8Address Address Elements
- *
- ****************************************************************************)
- DPNA_SEPARATOR_KEYVALUE = WideChar('=');
- {$EXTERNALSYM DPNA_SEPARATOR_KEYVALUE}
- DPNA_SEPARATOR_USERDATA = WideChar('#');
- {$EXTERNALSYM DPNA_SEPARATOR_USERDATA}
- DPNA_SEPARATOR_COMPONENT = WideChar(';');
- {$EXTERNALSYM DPNA_SEPARATOR_COMPONENT}
- DPNA_ESCAPECHAR = WideChar('%');
- {$EXTERNALSYM DPNA_ESCAPECHAR}
- // Header
- DPNA_HEADER = 'x-directplay:/';
- {$EXTERNALSYM DPNA_HEADER}
- // key names for address components
- DPNA_KEY_NAT_RESOLVER = 'natresolver';
- {$EXTERNALSYM DPNA_KEY_NAT_RESOLVER}
- DPNA_KEY_NAT_RESOLVER_USER_STRING = 'natresolveruserstring';
- {$EXTERNALSYM DPNA_KEY_NAT_RESOLVER_USER_STRING}
- DPNA_KEY_APPLICATION_INSTANCE = 'applicationinstance';
- {$EXTERNALSYM DPNA_KEY_APPLICATION_INSTANCE}
- DPNA_KEY_DEVICE = 'device';
- {$EXTERNALSYM DPNA_KEY_DEVICE}
- DPNA_KEY_HOSTNAME = 'hostname';
- {$EXTERNALSYM DPNA_KEY_HOSTNAME}
- DPNA_KEY_PORT = 'port';
- {$EXTERNALSYM DPNA_KEY_PORT}
- DPNA_KEY_NAMEINFO = 'nameinfo';
- {$EXTERNALSYM DPNA_KEY_NAMEINFO}
- DPNA_KEY_PROCESSOR = 'processor';
- {$EXTERNALSYM DPNA_KEY_PROCESSOR}
- DPNA_KEY_PROGRAM = 'program';
- {$EXTERNALSYM DPNA_KEY_PROGRAM}
- DPNA_KEY_PROVIDER = 'provider';
- {$EXTERNALSYM DPNA_KEY_PROVIDER}
- DPNA_KEY_SCOPE = 'scope';
- {$EXTERNALSYM DPNA_KEY_SCOPE}
- DPNA_KEY_TRAVERSALMODE = 'traversalmode';
- {$EXTERNALSYM DPNA_KEY_TRAVERSALMODE}
- DPNA_KEY_BAUD = 'baud';
- {$EXTERNALSYM DPNA_KEY_BAUD}
- DPNA_KEY_FLOWCONTROL = 'flowcontrol';
- {$EXTERNALSYM DPNA_KEY_FLOWCONTROL}
- DPNA_KEY_PARITY = 'parity';
- {$EXTERNALSYM DPNA_KEY_PARITY}
- DPNA_KEY_PHONENUMBER = 'phonenumber';
- {$EXTERNALSYM DPNA_KEY_PHONENUMBER}
- DPNA_KEY_STOPBITS = 'stopbits';
- {$EXTERNALSYM DPNA_KEY_STOPBITS}
- // values for baud rate
- DPNA_BAUD_RATE_9600 = 9600;
- {$EXTERNALSYM DPNA_BAUD_RATE_9600}
- DPNA_BAUD_RATE_14400 = 14400;
- {$EXTERNALSYM DPNA_BAUD_RATE_14400}
- DPNA_BAUD_RATE_19200 = 19200;
- {$EXTERNALSYM DPNA_BAUD_RATE_19200}
- DPNA_BAUD_RATE_38400 = 38400;
- {$EXTERNALSYM DPNA_BAUD_RATE_38400}
- DPNA_BAUD_RATE_56000 = 56000;
- {$EXTERNALSYM DPNA_BAUD_RATE_56000}
- DPNA_BAUD_RATE_57600 = 57600;
- {$EXTERNALSYM DPNA_BAUD_RATE_57600}
- DPNA_BAUD_RATE_115200 = 115200;
- {$EXTERNALSYM DPNA_BAUD_RATE_115200}
- // values for stop bits
- DPNA_STOP_BITS_ONE = '1';
- {$EXTERNALSYM DPNA_STOP_BITS_ONE}
- DPNA_STOP_BITS_ONE_FIVE = '1.5';
- {$EXTERNALSYM DPNA_STOP_BITS_ONE_FIVE}
- DPNA_STOP_BITS_TWO = '2';
- {$EXTERNALSYM DPNA_STOP_BITS_TWO}
- // values for parity
- DPNA_PARITY_NONE = 'NONE';
- {$EXTERNALSYM DPNA_PARITY_NONE}
- DPNA_PARITY_EVEN = 'EVEN';
- {$EXTERNALSYM DPNA_PARITY_EVEN}
- DPNA_PARITY_ODD = 'ODD';
- {$EXTERNALSYM DPNA_PARITY_ODD}
- DPNA_PARITY_MARK = 'MARK';
- {$EXTERNALSYM DPNA_PARITY_MARK}
- DPNA_PARITY_SPACE = 'SPACE';
- {$EXTERNALSYM DPNA_PARITY_SPACE}
- // values for flow control
- DPNA_FLOW_CONTROL_NONE = 'NONE';
- {$EXTERNALSYM DPNA_FLOW_CONTROL_NONE}
- DPNA_FLOW_CONTROL_XONXOFF = 'XONXOFF';
- {$EXTERNALSYM DPNA_FLOW_CONTROL_XONXOFF}
- DPNA_FLOW_CONTROL_RTS = 'RTS';
- {$EXTERNALSYM DPNA_FLOW_CONTROL_RTS}
- DPNA_FLOW_CONTROL_DTR = 'DTR';
- {$EXTERNALSYM DPNA_FLOW_CONTROL_DTR}
- DPNA_FLOW_CONTROL_RTSDTR = 'RTSDTR';
- {$EXTERNALSYM DPNA_FLOW_CONTROL_RTSDTR}
- // values for traversal mode
- DPNA_TRAVERSALMODE_NONE = 0;
- {$EXTERNALSYM DPNA_TRAVERSALMODE_NONE}
- DPNA_TRAVERSALMODE_PORTREQUIRED = 1;
- {$EXTERNALSYM DPNA_TRAVERSALMODE_PORTREQUIRED}
- DPNA_TRAVERSALMODE_PORTRECOMMENDED = 2;
- {$EXTERNALSYM DPNA_TRAVERSALMODE_PORTRECOMMENDED}
- // Shortcut values
- //
- // These can be used instead of the corresponding CLSID_DP8SP_XXXX guids
- //
- DPNA_VALUE_TCPIPPROVIDER = 'IP';
- {$EXTERNALSYM DPNA_VALUE_TCPIPPROVIDER}
- DPNA_VALUE_IPXPROVIDER = 'IPX';
- {$EXTERNALSYM DPNA_VALUE_IPXPROVIDER}
- DPNA_VALUE_MODEMPROVIDER = 'MODEM';
- {$EXTERNALSYM DPNA_VALUE_MODEMPROVIDER}
- DPNA_VALUE_SERIALPROVIDER = 'SERIAL';
- {$EXTERNALSYM DPNA_VALUE_SERIALPROVIDER}
- //// ANSI DEFINITIONS
- // Header
- DPNA_HEADER_A = 'x-directplay:/';
- {$EXTERNALSYM DPNA_HEADER_A}
- DPNA_SEPARATOR_KEYVALUE_A = '=';
- {$EXTERNALSYM DPNA_SEPARATOR_KEYVALUE_A}
- DPNA_SEPARATOR_USERDATA_A = '#';
- {$EXTERNALSYM DPNA_SEPARATOR_USERDATA_A}
- DPNA_SEPARATOR_COMPONENT_A = ';';
- {$EXTERNALSYM DPNA_SEPARATOR_COMPONENT_A}
- DPNA_ESCAPECHAR_A = '%';
- {$EXTERNALSYM DPNA_ESCAPECHAR_A}
- // key names for address components
- DPNA_KEY_NAT_RESOLVER_A = 'natresolver';
- {$EXTERNALSYM DPNA_KEY_NAT_RESOLVER_A}
- DPNA_KEY_NAT_RESOLVER_USER_STRING_A = 'natresolveruserstring';
- {$EXTERNALSYM DPNA_KEY_NAT_RESOLVER_USER_STRING_A}
- DPNA_KEY_APPLICATION_INSTANCE_A = 'applicationinstance';
- {$EXTERNALSYM DPNA_KEY_APPLICATION_INSTANCE_A}
- DPNA_KEY_DEVICE_A = 'device';
- {$EXTERNALSYM DPNA_KEY_DEVICE_A}
- DPNA_KEY_HOSTNAME_A = 'hostname';
- {$EXTERNALSYM DPNA_KEY_HOSTNAME_A}
- DPNA_KEY_PORT_A = 'port';
- {$EXTERNALSYM DPNA_KEY_PORT_A}
- DPNA_KEY_NAMEINFO_A = 'nameinfo';
- {$EXTERNALSYM DPNA_KEY_NAMEINFO_A}
- DPNA_KEY_PROCESSOR_A = 'processor';
- {$EXTERNALSYM DPNA_KEY_PROCESSOR_A}
- DPNA_KEY_PROGRAM_A = 'program';
- {$EXTERNALSYM DPNA_KEY_PROGRAM_A}
- DPNA_KEY_PROVIDER_A = 'provider';
- {$EXTERNALSYM DPNA_KEY_PROVIDER_A}
- DPNA_KEY_SCOPE_A = 'scope';
- {$EXTERNALSYM DPNA_KEY_SCOPE_A}
- DPNA_KEY_TRAVERSALMODE_A = 'traversalmode';
- {$EXTERNALSYM DPNA_KEY_TRAVERSALMODE_A}
- DPNA_KEY_BAUD_A = 'baud';
- {$EXTERNALSYM DPNA_KEY_BAUD_A}
- DPNA_KEY_FLOWCONTROL_A = 'flowcontrol';
- {$EXTERNALSYM DPNA_KEY_FLOWCONTROL_A}
- DPNA_KEY_PARITY_A = 'parity';
- {$EXTERNALSYM DPNA_KEY_PARITY_A}
- DPNA_KEY_PHONENUMBER_A = 'phonenumber';
- {$EXTERNALSYM DPNA_KEY_PHONENUMBER_A}
- DPNA_KEY_STOPBITS_A = 'stopbits';
- {$EXTERNALSYM DPNA_KEY_STOPBITS_A}
- // values for stop bits
- DPNA_STOP_BITS_ONE_A = '1';
- {$EXTERNALSYM DPNA_STOP_BITS_ONE_A}
- DPNA_STOP_BITS_ONE_FIVE_A = '1.5';
- {$EXTERNALSYM DPNA_STOP_BITS_ONE_FIVE_A}
- DPNA_STOP_BITS_TWO_A = '2';
- {$EXTERNALSYM DPNA_STOP_BITS_TWO_A}
- // values for parity
- DPNA_PARITY_NONE_A = 'NONE';
- {$EXTERNALSYM DPNA_PARITY_NONE_A}
- DPNA_PARITY_EVEN_A = 'EVEN';
- {$EXTERNALSYM DPNA_PARITY_EVEN_A}
- DPNA_PARITY_ODD_A = 'ODD';
- {$EXTERNALSYM DPNA_PARITY_ODD_A}
- DPNA_PARITY_MARK_A = 'MARK';
- {$EXTERNALSYM DPNA_PARITY_MARK_A}
- DPNA_PARITY_SPACE_A = 'SPACE';
- {$EXTERNALSYM DPNA_PARITY_SPACE_A}
- // values for flow control
- DPNA_FLOW_CONTROL_NONE_A = 'NONE';
- {$EXTERNALSYM DPNA_FLOW_CONTROL_NONE_A}
- DPNA_FLOW_CONTROL_XONXOFF_A = 'XONXOFF';
- {$EXTERNALSYM DPNA_FLOW_CONTROL_XONXOFF_A}
- DPNA_FLOW_CONTROL_RTS_A = 'RTS';
- {$EXTERNALSYM DPNA_FLOW_CONTROL_RTS_A}
- DPNA_FLOW_CONTROL_DTR_A = 'DTR';
- {$EXTERNALSYM DPNA_FLOW_CONTROL_DTR_A}
- DPNA_FLOW_CONTROL_RTSDTR_A = 'RTSDTR';
- {$EXTERNALSYM DPNA_FLOW_CONTROL_RTSDTR_A}
- // Shortcut values
- //
- // These can be used instead of the corresponding CLSID_DP8SP_XXXX guids
- //
- DPNA_VALUE_TCPIPPROVIDER_A = 'IP';
- {$EXTERNALSYM DPNA_VALUE_TCPIPPROVIDER_A}
- DPNA_VALUE_IPXPROVIDER_A = 'IPX';
- {$EXTERNALSYM DPNA_VALUE_IPXPROVIDER_A}
- DPNA_VALUE_MODEMPROVIDER_A = 'MODEM';
- {$EXTERNALSYM DPNA_VALUE_MODEMPROVIDER_A}
- DPNA_VALUE_SERIALPROVIDER_A = 'SERIAL';
- {$EXTERNALSYM DPNA_VALUE_SERIALPROVIDER_A}
- type
- (****************************************************************************
- *
- * DirectPlay8Address Forward Declarations For External Types
- *
- ****************************************************************************)
- SOCKADDR = TSockAddr;
- {$EXTERNALSYM SOCKADDR}
- (****************************************************************************
- *
- * DirectPlay8Address Functions
- *
- ****************************************************************************)
- (*
- *
- * This function is no longer supported. It is recommended that CoCreateInstance be used to create
- * DirectPlay8 address objects.
- *
- * HRESULT WINAPI DirectPlay8AddressCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown);
- *
- *)
- (****************************************************************************
- *
- * DirectPlay8Address Application Interfaces
- *
- ****************************************************************************)
- //
- // COM definition for IDirectPlay8Address Generic Interface
- //
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlay8Address);'}
- {$EXTERNALSYM IDirectPlay8Address}
- IDirectPlay8Address = interface(IUnknown)
- ['{83783300-4063-4c8a-9db3-82830a7feb31}']
- (*** IDirectPlay8Address methods ***)
- function BuildFromURLW(pwszSourceURL: PWideChar): HResult; stdcall;
- function BuildFromURLA(pszSourceURL: PAnsiChar): HResult; stdcall;
- function Duplicate(out ppdpaNewAddress: IDirectPlay8Address): HResult; stdcall;
- function SetEqual(pdpaAddress: IDirectPlay8Address): HResult; stdcall;
- function IsEqual(pdpaAddress: IDirectPlay8Address): HResult; stdcall;
- function Clear: HResult; stdcall;
- function GetURLW(pwszURL: PWideChar; var pdwNumChars: DWORD): HResult; stdcall;
- function GetURLA(pszURL: PAnsiChar; var pdwNumChars: DWORD): HResult; stdcall;
- function GetSP(out pguidSP: TGUID): HResult; stdcall;
- function GetUserData(pvUserData: Pointer; var pdwBufferSize: DWORD): HResult; stdcall;
- function SetSP(const pguidSP: TGUID): HResult; stdcall;
- function SetUserData(pvUserData: Pointer; dwDataSize: DWORD): HResult; stdcall;
- function GetNumComponents(out pdwNumComponents: DWORD): HResult; stdcall;
- function GetComponentByName(pwszName: PWideChar; pvBuffer: Pointer; var pdwBufferSize: DWORD; out pdwDataType: DWORD): HResult; stdcall;
- function GetComponentByIndex(dwComponentID: DWORD; pwszName: PWideChar; var pdwNameLen: DWORD; pvBuffer: Pointer; var pdwBufferSize: DWORD; out pdwDataType: DWORD): HResult; stdcall;
- function AddComponent(pwszName: PWideChar; lpvData: Pointer; dwDataSize, dwDataType: DWORD): HResult; stdcall;
- function GetDevice(out pguidDevice: TGUID): HResult; stdcall;
- function SetDevice(const pguidDevice: TGUID): HResult; stdcall;
- function BuildFromDPADDRESS(pvAddress: Pointer; dwDataSize: DWORD): HResult; stdcall;
- end;
- {$NODEFINE PIDirectPlay8Address}
- {$HPPEMIT 'typedef _di_IDirectPlay8Address *PIDirectPlay8Address;'}
- PIDirectPlay8Address = ^IDirectPlay8Address;
- //
- // COM definition for IDirectPlay8AddressIP Generic Interface
- //
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlay8AddressIP);'}
- {$EXTERNALSYM IDirectPlay8AddressIP}
- IDirectPlay8AddressIP = interface(IUnknown)
- ['{e5a0e990-2bad-430b-87da-a142cf75de58}']
- (*** IDirectPlay8AddressIP methods ***)
- // Constructs a IDirectPlay8 TCP Address from a SOCKADDR structure
- function BuildFromSockAddr(const pSockAddr: TSockAddr): HResult; stdcall;
- // Constructs a TCP Address from a string (hostname) and port
- function BuildAddress(wszAddress: PWideChar; usPort: Word): HResult; stdcall;
- // Builds a local TCP Address
- function BuildLocalAddress(const pguidAdapter: TGUID; usPort: Word): HResult; stdcall;
- // Gets the address from the structure in SOCKADR format
- function GetSockAddress(psockAddress: PSockAddr; var pdwAddressBufferSize: DWORD): HResult; stdcall;
- // Gets the local afddress
- function GetLocalAddress(out pguidAdapter: TGUID; out pusPort: Word): HResult; stdcall;
- // Gets the remote address
- function GetAddress(wszAddress: PWideChar; var pdwAddressLength: DWORD; out psPort: Word): HResult; stdcall;
- end;
- (****************************************************************************
- *
- * DirectPlay8Address Interface IIDs
- *
- ****************************************************************************)
- type
- // {83783300-4063-4c8a-9DB3-82830A7FEB31}
- IID_IDirectPlay8Address = IDirectPlay8Address;
- {$EXTERNALSYM IID_IDirectPlay8Address}
- // {E5A0E990-2BAD-430b-87DA-A142CF75DE58}
- IID_IDirectPlay8AddressIP = IDirectPlay8AddressIP;
- {$EXTERNALSYM IID_IDirectPlay8AddressIP}
- (*==========================================================================;
- *
- * Copyright (C) 1998-2002 Microsoft Corporation. All Rights Reserved.
- *
- * File: DPlay8.h
- * Content: DirectPlay8 include file
- *
- ***************************************************************************)
- const
- (****************************************************************************
- *
- * DirectPlay8 CLSIDs
- *
- ****************************************************************************)
- // {743F1DC6-5ABA-429f-8BDF-C54D03253DC2}
- CLSID_DirectPlay8Client: TGUID = '{743f1dc6-5aba-429f-8bdf-c54d03253dc2}';
- {$EXTERNALSYM CLSID_DirectPlay8Client}
- // {DA825E1B-6830-43d7-835D-0B5AD82956A2}
- CLSID_DirectPlay8Server: TGUID = '{da825e1b-6830-43d7-835d-0b5ad82956a2}';
- {$EXTERNALSYM CLSID_DirectPlay8Server}
- // {286F484D-375E-4458-A272-B138E2F80A6A}
- CLSID_DirectPlay8Peer: TGUID = '{286f484d-375e-4458-a272-b138e2f80a6a}';
- {$EXTERNALSYM CLSID_DirectPlay8Peer}
- // CLSIDs added for DirectX 9
- // {FC47060E-6153-4b34-B975-8E4121EB7F3C}
- CLSID_DirectPlay8ThreadPool: TGUID = '{fc47060e-6153-4b34-b975-8e4121eb7f3c}';
- {$EXTERNALSYM CLSID_DirectPlay8ThreadPool}
- // {E4C1D9A2-CBF7-48bd-9A69-34A55E0D8941}
- CLSID_DirectPlay8NATResolver: TGUID = '{e4c1d9a2-cbf7-48bd-9a69-34a55e0d8941}';
- {$EXTERNALSYM CLSID_DirectPlay8NATResolver}
- (****************************************************************************
- *
- * DirectPlay8 Service Provider GUIDs
- *
- ****************************************************************************)
- // {53934290-628D-11D2-AE0F-006097B01411}
- CLSID_DP8SP_IPX: TGUID = '{53934290-628d-11d2-ae0f-006097b01411}';
- {$EXTERNALSYM CLSID_DP8SP_IPX}
- // {6D4A3650-628D-11D2-AE0F-006097B01411}
- CLSID_DP8SP_MODEM: TGUID = '{6d4a3650-628d-11d2-ae0f-006097b01411}';
- {$EXTERNALSYM CLSID_DP8SP_MODEM}
- // {743B5D60-628D-11D2-AE0F-006097B01411}
- CLSID_DP8SP_SERIAL: TGUID = '{743b5d60-628d-11d2-ae0f-006097b01411}';
- {$EXTERNALSYM CLSID_DP8SP_SERIAL}
- // {EBFE7BA0-628D-11D2-AE0F-006097B01411}
- CLSID_DP8SP_TCPIP: TGUID = '{ebfe7ba0-628d-11d2-ae0f-006097b01411}';
- {$EXTERNALSYM CLSID_DP8SP_TCPIP}
- // Service providers added for DirectX 9
- // {995513AF-3027-4b9a-956E-C772B3F78006}
- CLSID_DP8SP_BLUETOOTH: TGUID = '{995513af-3027-4b9a-956e-c772b3f78006}';
- {$EXTERNALSYM CLSID_DP8SP_BLUETOOTH}
- type
- (****************************************************************************
- *
- * DirectPlay8 Callback Functions
- *
- ****************************************************************************)
- //
- // Callback Function Type Definition
- //
- TFNDPNMessageHandler = function (pvUserContext: Pointer; dwMessageType: DWORD; pMessage: Pointer): HRESULT; stdcall;
- {$NODEFINE TFNDPNMessageHandler}
- {$HPPEMIT 'typedef PFNDPNMESSAGEHANDLER TFNDPNMessageHandler;'}
- (****************************************************************************
- *
- * DirectPlay8 Datatypes (Non-Structure / Non-Message)
- *
- ****************************************************************************)
- //
- // Player IDs. Used to uniquely identify a player in a session
- //
- PDPNID = ^DPNID;
- {$EXTERNALSYM PDPNID}
- DPNID = {$IFDEF TYPE_IDENTITY}type {$ENDIF}DWORD;
- {$EXTERNALSYM DPNID}
- TDPNID = DPNID;
- //
- // Used as identifiers for operations
- //
- PDPNHandle = ^TDPNHandle;
- DPNHANDLE = {$IFDEF TYPE_IDENTITY}type {$ENDIF}DWORD;
- {$EXTERNALSYM DPNHANDLE}
- TDPNHandle = DPNHANDLE;
- (****************************************************************************
- *
- * DirectPlay8 Message Identifiers
- *
- ****************************************************************************)
- const
- DPN_MSGID_OFFSET = $FFFF0000;
- {$EXTERNALSYM DPN_MSGID_OFFSET}
- DPN_MSGID_ADD_PLAYER_TO_GROUP = (DPN_MSGID_OFFSET or $0001);
- {$EXTERNALSYM DPN_MSGID_ADD_PLAYER_TO_GROUP}
- DPN_MSGID_APPLICATION_DESC = (DPN_MSGID_OFFSET or $0002);
- {$EXTERNALSYM DPN_MSGID_APPLICATION_DESC}
- DPN_MSGID_ASYNC_OP_COMPLETE = (DPN_MSGID_OFFSET or $0003);
- {$EXTERNALSYM DPN_MSGID_ASYNC_OP_COMPLETE}
- DPN_MSGID_CLIENT_INFO = (DPN_MSGID_OFFSET or $0004);
- {$EXTERNALSYM DPN_MSGID_CLIENT_INFO}
- DPN_MSGID_CONNECT_COMPLETE = (DPN_MSGID_OFFSET or $0005);
- {$EXTERNALSYM DPN_MSGID_CONNECT_COMPLETE}
- DPN_MSGID_CREATE_GROUP = (DPN_MSGID_OFFSET or $0006);
- {$EXTERNALSYM DPN_MSGID_CREATE_GROUP}
- DPN_MSGID_CREATE_PLAYER = (DPN_MSGID_OFFSET or $0007);
- {$EXTERNALSYM DPN_MSGID_CREATE_PLAYER}
- DPN_MSGID_DESTROY_GROUP = (DPN_MSGID_OFFSET or $0008);
- {$EXTERNALSYM DPN_MSGID_DESTROY_GROUP}
- DPN_MSGID_DESTROY_PLAYER = (DPN_MSGID_OFFSET or $0009);
- {$EXTERNALSYM DPN_MSGID_DESTROY_PLAYER}
- DPN_MSGID_ENUM_HOSTS_QUERY = (DPN_MSGID_OFFSET or $000a);
- {$EXTERNALSYM DPN_MSGID_ENUM_HOSTS_QUERY}
- DPN_MSGID_ENUM_HOSTS_RESPONSE = (DPN_MSGID_OFFSET or $000b);
- {$EXTERNALSYM DPN_MSGID_ENUM_HOSTS_RESPONSE}
- DPN_MSGID_GROUP_INFO = (DPN_MSGID_OFFSET or $000c);
- {$EXTERNALSYM DPN_MSGID_GROUP_INFO}
- DPN_MSGID_HOST_MIGRATE = (DPN_MSGID_OFFSET or $000d);
- {$EXTERNALSYM DPN_MSGID_HOST_MIGRATE}
- DPN_MSGID_INDICATE_CONNECT = (DPN_MSGID_OFFSET or $000e);
- {$EXTERNALSYM DPN_MSGID_INDICATE_CONNECT}
- DPN_MSGID_INDICATED_CONNECT_ABORTED = (DPN_MSGID_OFFSET or $000f);
- {$EXTERNALSYM DPN_MSGID_INDICATED_CONNECT_ABORTED}
- DPN_MSGID_PEER_INFO = (DPN_MSGID_OFFSET or $0010);
- {$EXTERNALSYM DPN_MSGID_PEER_INFO}
- DPN_MSGID_RECEIVE = (DPN_MSGID_OFFSET or $0011);
- {$EXTERNALSYM DPN_MSGID_RECEIVE}
- DPN_MSGID_REMOVE_PLAYER_FROM_GROUP = (DPN_MSGID_OFFSET or $0012);
- {$EXTERNALSYM DPN_MSGID_REMOVE_PLAYER_FROM_GROUP}
- DPN_MSGID_RETURN_BUFFER = (DPN_MSGID_OFFSET or $0013);
- {$EXTERNALSYM DPN_MSGID_RETURN_BUFFER}
- DPN_MSGID_SEND_COMPLETE = (DPN_MSGID_OFFSET or $0014);
- {$EXTERNALSYM DPN_MSGID_SEND_COMPLETE}
- DPN_MSGID_SERVER_INFO = (DPN_MSGID_OFFSET or $0015);
- {$EXTERNALSYM DPN_MSGID_SERVER_INFO}
- DPN_MSGID_TERMINATE_SESSION = (DPN_MSGID_OFFSET or $0016);
- {$EXTERNALSYM DPN_MSGID_TERMINATE_SESSION}
- // Messages added for DirectX 9
- DPN_MSGID_CREATE_THREAD = (DPN_MSGID_OFFSET or $0017);
- {$EXTERNALSYM DPN_MSGID_CREATE_THREAD}
- DPN_MSGID_DESTROY_THREAD = (DPN_MSGID_OFFSET or $0018);
- {$EXTERNALSYM DPN_MSGID_DESTROY_THREAD}
- DPN_MSGID_NAT_RESOLVER_QUERY = (DPN_MSGID_OFFSET or $0101);
- {$EXTERNALSYM DPN_MSGID_NAT_RESOLVER_QUERY}
- (****************************************************************************
- *
- * DirectPlay8 Constants
- *
- ****************************************************************************)
- DPNID_ALL_PLAYERS_GROUP = 0;
- {$EXTERNALSYM DPNID_ALL_PLAYERS_GROUP}
- //
- // DESTROY_GROUP reasons
- //
- DPNDESTROYGROUPREASON_NORMAL = $0001;
- {$EXTERNALSYM DPNDESTROYGROUPREASON_NORMAL}
- DPNDESTROYGROUPREASON_AUTODESTRUCTED = $0002;
- {$EXTERNALSYM DPNDESTROYGROUPREASON_AUTODESTRUCTED}
- DPNDESTROYGROUPREASON_SESSIONTERMINATED = $0003;
- {$EXTERNALSYM DPNDESTROYGROUPREASON_SESSIONTERMINATED}
- //
- // DESTROY_PLAYER reasons
- //
- DPNDESTROYPLAYERREASON_NORMAL = $0001;
- {$EXTERNALSYM DPNDESTROYPLAYERREASON_NORMAL}
- DPNDESTROYPLAYERREASON_CONNECTIONLOST = $0002;
- {$EXTERNALSYM DPNDESTROYPLAYERREASON_CONNECTIONLOST}
- DPNDESTROYPLAYERREASON_SESSIONTERMINATED = $0003;
- {$EXTERNALSYM DPNDESTROYPLAYERREASON_SESSIONTERMINATED}
- DPNDESTROYPLAYERREASON_HOSTDESTROYEDPLAYER = $0004;
- {$EXTERNALSYM DPNDESTROYPLAYERREASON_HOSTDESTROYEDPLAYER}
- DPN_MAX_APPDESC_RESERVEDDATA_SIZE = 64;
- {$EXTERNALSYM DPN_MAX_APPDESC_RESERVEDDATA_SIZE}
- (****************************************************************************
- *
- * DirectPlay8 Flags
- *
- ****************************************************************************)
- //
- // Asynchronous operation flags (For Async Ops)
- //
- DPNOP_SYNC = $80000000;
- {$EXTERNALSYM DPNOP_SYNC}
- //
- // Add player to group flags (For AddPlayerToGroup)
- //
- DPNADDPLAYERTOGROUP_SYNC = DPNOP_SYNC;
- {$EXTERNALSYM DPNADDPLAYERTOGROUP_SYNC}
- //
- // Cancel flags
- //
- DPNCANCEL_CONNECT = $0001;
- {$EXTERNALSYM DPNCANCEL_CONNECT}
- DPNCANCEL_ENUM = $0002;
- {$EXTERNALSYM DPNCANCEL_ENUM}
- DPNCANCEL_SEND = $0004;
- {$EXTERNALSYM DPNCANCEL_SEND}
- DPNCANCEL_ALL_OPERATIONS = $8000;
- {$EXTERNALSYM DPNCANCEL_ALL_OPERATIONS}
- // Flags added for DirectX 9
- DPNCANCEL_PLAYER_SENDS = $80000000;
- {$EXTERNALSYM DPNCANCEL_PLAYER_SENDS}
- DPNCANCEL_PLAYER_SENDS_PRIORITY_HIGH = (DPNCANCEL_PLAYER_SENDS or $00010000);
- {$EXTERNALSYM DPNCANCEL_PLAYER_SENDS_PRIORITY_HIGH}
- DPNCANCEL_PLAYER_SENDS_PRIORITY_NORMAL = (DPNCANCEL_PLAYER_SENDS or $00020000);
- {$EXTERNALSYM DPNCANCEL_PLAYER_SENDS_PRIORITY_NORMAL}
- DPNCANCEL_PLAYER_SENDS_PRIORITY_LOW = (DPNCANCEL_PLAYER_SENDS or $00040000);
- {$EXTERNALSYM DPNCANCEL_PLAYER_SENDS_PRIORITY_LOW}
- //
- // Close flags (for Close, added for DirectX 9)
- //
- DPNCLOSE_IMMEDIATE = $00000001;
- {$EXTERNALSYM DPNCLOSE_IMMEDIATE}
- //
- // Connect flags (For Connect)
- //
- DPNCONNECT_SYNC = DPNOP_SYNC;
- {$EXTERNALSYM DPNCONNECT_SYNC}
- DPNCONNECT_OKTOQUERYFORADDRESSING = $0001;
- {$EXTERNALSYM DPNCONNECT_OKTOQUERYFORADDRESSING}
- //
- // Create group flags (For CreateGroup)
- //
- DPNCREATEGROUP_SYNC = DPNOP_SYNC;
- {$EXTERNALSYM DPNCREATEGROUP_SYNC}
- //
- // Destroy group flags (For DestroyGroup)
- //
- DPNDESTROYGROUP_SYNC = DPNOP_SYNC;
- {$EXTERNALSYM DPNDESTROYGROUP_SYNC}
- //
- // Enumerate clients and groups flags (For EnumPlayersAndGroups)
- //
- DPNENUM_PLAYERS = $0001;
- {$EXTERNALSYM DPNENUM_PLAYERS}
- DPNENUM_GROUPS = $0010;
- {$EXTERNALSYM DPNENUM_GROUPS}
- //
- // Enum hosts flags (For EnumHosts)
- //
- DPNENUMHOSTS_SYNC = DPNOP_SYNC;
- {$EXTERNALSYM DPNENUMHOSTS_SYNC}
- DPNENUMHOSTS_OKTOQUERYFORADDRESSING = $0001;
- {$EXTERNALSYM DPNENUMHOSTS_OKTOQUERYFORADDRESSING}
- DPNENUMHOSTS_NOBROADCASTFALLBACK = $0002;
- {$EXTERNALSYM DPNENUMHOSTS_NOBROADCASTFALLBACK}
- //
- // Enum service provider flags (For EnumSP)
- //
- DPNENUMSERVICEPROVIDERS_ALL = $0001;
- {$EXTERNALSYM DPNENUMSERVICEPROVIDERS_ALL}
- //
- // GetLocalHostAddresses flags (added for DirectX 9)
- //
- DPNGETLOCALHOSTADDRESSES_COMBINED = $0001;
- {$EXTERNALSYM DPNGETLOCALHOSTADDRESSES_COMBINED}
- //
- // Get send queue info flags (For GetSendQueueInfo)
- //
- DPNGETSENDQUEUEINFO_PRIORITY_NORMAL = $0001;
- {$EXTERNALSYM DPNGETSENDQUEUEINFO_PRIORITY_NORMAL}
- DPNGETSENDQUEUEINFO_PRIORITY_HIGH = $0002;
- {$EXTERNALSYM DPNGETSENDQUEUEINFO_PRIORITY_HIGH}
- DPNGETSENDQUEUEINFO_PRIORITY_LOW = $0004;
- {$EXTERNALSYM DPNGETSENDQUEUEINFO_PRIORITY_LOW}
- //
- // Group information flags (For Group Info)
- //
- DPNGROUP_AUTODESTRUCT = $0001;
- {$EXTERNALSYM DPNGROUP_AUTODESTRUCT}
- //
- // Host flags (For Host)
- //
- DPNHOST_OKTOQUERYFORADDRESSING = $0001;
- {$EXTERNALSYM DPNHOST_OKTOQUERYFORADDRESSING}
- //
- // Set info
- //
- DPNINFO_NAME = $0001;
- {$EXTERNALSYM DPNINFO_NAME}
- DPNINFO_DATA = $0002;
- {$EXTERNALSYM DPNINFO_DATA}
- //
- // Initialize flags (For Initialize)
- //
- DPNINITIALIZE_DISABLEPARAMVAL = $0001;
- {$EXTERNALSYM DPNINITIALIZE_DISABLEPARAMVAL}
- // Flags added for DirectX 9
- DPNINITIALIZE_HINT_LANSESSION = $0002;
- {$EXTERNALSYM DPNINITIALIZE_HINT_LANSESSION}
- DPNINITIALIZE_DISABLELINKTUNING = $0004;
- {$EXTERNALSYM DPNINITIALIZE_DISABLELINKTUNING}
- //
- // Register Lobby flags
- //
- DPNLOBBY_REGISTER = $0001;
- {$EXTERNALSYM DPNLOBBY_REGISTER}
- DPNLOBBY_UNREGISTER = $0002;
- {$EXTERNALSYM DPNLOBBY_UNREGISTER}
- //
- // Player information flags (For Player Info / Player Messages)
- //
- DPNPLAYER_LOCAL = $0002;
- {$EXTERNALSYM DPNPLAYER_LOCAL}
- DPNPLAYER_HOST = $0004;
- {$EXTERNALSYM DPNPLAYER_HOST}
- //
- // Receive indication flags (added for DirectX 9)
- //
- DPNRECEIVE_GUARANTEED = $0001;
- {$EXTERNALSYM DPNRECEIVE_GUARANTEED}
- DPNRECEIVE_COALESCED = $0002;
- {$EXTERNALSYM DPNRECEIVE_COALESCED}
- //
- // Remove player from group flags (For RemovePlayerFromGroup)
- //
- DPNREMOVEPLAYERFROMGROUP_SYN = DPNOP_SYNC;
- {$EXTERNALSYM DPNREMOVEPLAYERFROMGROUP_SYN}
- //
- // Send flags (For Send/SendTo)
- //
- DPNSEND_SYNC = DPNOP_SYNC;
- {$EXTERNALSYM DPNSEND_SYNC}
- DPNSEND_NOCOPY = $0001;
- {$EXTERNALSYM DPNSEND_NOCOPY}
- DPNSEND_NOCOMPLETE = $0002;
- {$EXTERNALSYM DPNSEND_NOCOMPLETE}
- DPNSEND_COMPLETEONPROCESS = $0004;
- {$EXTERNALSYM DPNSEND_COMPLETEONPROCESS}
- DPNSEND_GUARANTEED = $0008;
- {$EXTERNALSYM DPNSEND_GUARANTEED}
- DPNSEND_NONSEQUENTIAL = $0010;
- {$EXTERNALSYM DPNSEND_NONSEQUENTIAL}
- DPNSEND_NOLOOPBACK = $0020;
- {$EXTERNALSYM DPNSEND_NOLOOPBACK}
- DPNSEND_PRIORITY_LOW = $0040;
- {$EXTERNALSYM DPNSEND_PRIORITY_LOW}
- DPNSEND_PRIORITY_HIGH = $0080;
- {$EXTERNALSYM DPNSEND_PRIORITY_HIGH}
- // Flag added for DirectX 9
- DPNSEND_COALESCE = $0100;
- {$EXTERNALSYM DPNSEND_COALESCE}
- //
- // Send complete indication flags (added for DirectX 9)
- //
- DPNSENDCOMPLETE_GUARANTEED = $0001;
- {$EXTERNALSYM DPNSENDCOMPLETE_GUARANTEED}
- DPNSENDCOMPLETE_COALESCED = $0002;
- {$EXTERNALSYM DPNSENDCOMPLETE_COALESCED}
- //
- // Session Flags (for DPN_APPLICATION_DESC)
- //
- DPNSESSION_CLIENT_SERVER = $0001;
- {$EXTERNALSYM DPNSESSION_CLIENT_SERVER}
- DPNSESSION_MIGRATE_HOST = $0004;
- {$EXTERNALSYM DPNSESSION_MIGRATE_HOST}
- DPNSESSION_NODPNSVR = $0040;
- {$EXTERNALSYM DPNSESSION_NODPNSVR}
- DPNSESSION_REQUIREPASSWORD = $0080;
- {$EXTERNALSYM DPNSESSION_REQUIREPASSWORD}
- // Flag added for DirectX 9
- DPNSESSION_NOENUMS = $0100;
- {$EXTERNALSYM DPNSESSION_NOENUMS}
- DPNSESSION_FAST_SIGNED = $0200;
- {$EXTERNALSYM DPNSESSION_FAST_SIGNED}
- DPNSESSION_FULL_SIGNED = $0400;
- {$EXTERNALSYM DPNSESSION_FULL_SIGNED}
- //
- // Set client info flags (For SetClientInfo)
- //
- DPNSETCLIENTINFO_SYNC = DPNOP_SYNC;
- {$EXTERNALSYM DPNSETCLIENTINFO_SYNC}
- //
- // Set group info flags (For SetGroupInfo)
- //
- DPNSETGROUPINFO_SYNC = DPNOP_SYNC;
- {$EXTERNALSYM DPNSETGROUPINFO_SYNC}
- //
- // Set peer info flags (For SetPeerInfo)
- //
- DPNSETPEERINFO_SYNC = DPNOP_SYNC;
- {$EXTERNALSYM DPNSETPEERINFO_SYNC}
- //
- // Set server info flags (For SetServerInfo)
- //
- DPNSETSERVERINFO_SYNC = DPNOP_SYNC;
- {$EXTERNALSYM DPNSETSERVERINFO_SYNC}
- //
- // SP capabilities flags
- //
- DPNSPCAPS_SUPPORTSDPNSVR = $0001;
- {$EXTERNALSYM DPNSPCAPS_SUPPORTSDPNSVR}
- DPNSPCAPS_SUPPORTSDPNSRV = DPNSPCAPS_SUPPORTSDPNSVR;
- {$EXTERNALSYM DPNSPCAPS_SUPPORTSDPNSRV}
- DPNSPCAPS_SUPPORTSBROADCAST = $0002;
- {$EXTERNALSYM DPNSPCAPS_SUPPORTSBROADCAST}
- DPNSPCAPS_SUPPORTSALLADAPTERS = $0004;
- {$EXTERNALSYM DPNSPCAPS_SUPPORTSALLADAPTERS}
- // Flags added for DirectX 9
- DPNSPCAPS_SUPPORTSTHREADPOOL = $0008;
- {$EXTERNALSYM DPNSPCAPS_SUPPORTSTHREADPOOL}
- DPNSPCAPS_NETWORKSIMULATOR = $0010;
- {$EXTERNALSYM DPNSPCAPS_NETWORKSIMULATOR}
- //
- // SP information flags (added for DirectX 9)
- //
- DPNSPINFO_NETWORKSIMULATORDEVICE = $0001;
- {$EXTERNALSYM DPNSPINFO_NETWORKSIMULATORDEVICE}
- (****************************************************************************
- *
- * DirectPlay8 Structures (Non-Message)
- *
- ****************************************************************************)
- type
- //
- // Application description
- //
- PDPNApplicationDesc = ^TDPNApplicationDesc;
- _DPN_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: PWideChar; // Name of the session
- pwszPassword: PWideChar; // Password for the session
- pvReservedData: Pointer;
- dwReservedDataSize: DWORD;
- pvApplicationReservedData: Pointer;
- dwApplicationReservedDataSize: DWORD;
- end;
- {$EXTERNALSYM _DPN_APPLICATION_DESC}
- DPN_APPLICATION_DESC = _DPN_APPLICATION_DESC;
- {$EXTERNALSYM DPN_APPLICATION_DESC}
- TDPNApplicationDesc = _DPN_APPLICATION_DESC;
- //
- // Generic Buffer Description
- //
- PBufferDesc = ^TBufferDesc;
- _BUFFERDESC = packed record
- wBufferSize:DWORD;
- pBufferData: PByte;
- end;
- {$EXTERNALSYM _BUFFERDESC}
- BUFFERDESC = _BUFFERDESC;
- {$EXTERNALSYM BUFFERDESC}
- TBufferDesc = _BUFFERDESC;
- PDPNBufferDesc = ^TDPNBufferDesc;
- DPN_BUFFER_DESC = _BUFFERDESC;
- {$EXTERNALSYM DPN_BUFFER_DESC}
- TDPNBufferDesc = DPN_BUFFER_DESC;
- //
- // DirectPlay8 capabilities
- //
- PDPNCaps = ^TDPNCaps;
- _DPN_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;
- {$EXTERNALSYM _DPN_CAPS}
- DPN_CAPS = _DPN_CAPS;
- {$EXTERNALSYM DPN_CAPS}
- TDPNCaps = _DPN_CAPS;
- //
- // Extended capabilities structures (added for DirectX 9)
- //
- PDPNCapsEx = ^TDPNCapsEx;
- _DPN_CAPS_EX = 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
- 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
- pvGroupContext: Pointer; // Group context value
- end;
- {$EXTERNALSYM _DPNMSG_GROUP_INFO}
- DPNMSG_GROUP_INFO = _DPNMSG_GROUP_INFO;
- {$EXTERNALSYM DPNMSG_GROUP_INFO}
- TDPNMsgGroupInfo = _DPNMSG_GROUP_INFO;
- //
- // Migrate host structure for message handler
- // (DPN_MSGID_HOST_MIGRATE)
- //
- PDPNMsgHostMigrate = ^TDPNMsgHostMigrate;
- _DPNMSG_HOST_MIGRATE = packed record
- dwSize: DWORD; // Size of this structure
- dpnidNewHost: TDPNID; // DPNID of new Host player
- pvPlayerContext: Pointer; // Player context value
- end;
- {$EXTERNALSYM _DPNMSG_HOST_MIGRATE}
- DPNMSG_HOST_MIGRATE = _DPNMSG_HOST_MIGRATE;
- {$EXTERNALSYM DPNMSG_HOST_MIGRATE}
- TDPNMsgHostMigrate = _DPNMSG_HOST_MIGRATE;
- //
- // Indicate connect structure for message handler
- // (DPN_MSGID_INDICATE_CONNECT)
- //
- PDPNMsgIndicateConnect = ^TDPNMsgIndicateConnect;
- _DPNMSG_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;
- {$EXTERNALSYM _DPNMSG_INDICATE_CONNECT}
- DPNMSG_INDICATE_CONNECT = _DPNMSG_INDICATE_CONNECT;
- {$EXTERNALSYM DPNMSG_INDICATE_CONNECT}
- TDPNMsgIndicateConnect = _DPNMSG_INDICATE_CONNECT;
- //
- // Indicated connect aborted structure for message handler
- // (DPN_MSGID_INDICATED_CONNECT_ABORTED)
- //
- PDPNMsgIndicatedConnectAborted = ^TDPNMsgIndicatedConnectAborted;
- _DPNMSG_INDICATED_CONNECT_ABORTED = packed record
- dwSize: DWORD; // Size of this structure
- pvPlayerContext: Pointer; // Player context preset from DPNMSG_INDICATE_CONNECT
- end;
- {$EXTERNALSYM _DPNMSG_INDICATED_CONNECT_ABORTED}
- DPNMSG_INDICATED_CONNECT_ABORTED = _DPNMSG_INDICATED_CONNECT_ABORTED;
- {$EXTERNALSYM DPNMSG_INDICATED_CONNECT_ABORTED}
- TDPNMsgIndicatedConnectAborted = _DPNMSG_INDICATED_CONNECT_ABORTED;
- //
- // Peer info structure for message handler
- // (DPN_MSGID_PEER_INFO)
- //
- PDPNMsgPeerInfo = ^TDPNMsgPeerInfo;
- _DPNMSG_PEER_INFO = packed record
- dwSize: DWORD; // Size of this structure
- dpnidPeer: TDPNID; // DPNID of peer
- pvPlayerContext: Pointer; // Player context value
- end;
- {$EXTERNALSYM _DPNMSG_PEER_INFO}
- DPNMSG_PEER_INFO = _DPNMSG_PEER_INFO;
- {$EXTERNALSYM DPNMSG_PEER_INFO}
- TDPNMsgPeerInfo = _DPNMSG_PEER_INFO;
- //
- // Receive structure for message handler
- // (DPN_MSGID_RECEIVE)
- //
- PDPNMsgReceive = ^TDPNMsgReceive;
- _DPNMSG_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
- // Fields added for DirectX 9
- dwReceiveFlags: DWORD; // Flags describing how message was received
- end;
- {$EXTERNALSYM _DPNMSG_RECEIVE}
- DPNMSG_RECEIVE = _DPNMSG_RECEIVE;
- {$EXTERNALSYM DPNMSG_RECEIVE}
- TDPNMsgReceive = _DPNMSG_RECEIVE;
- //
- // Remove player from group structure for message handler
- // (DPN_MSGID_REMOVE_PLAYER_FROM_GROUP)
- //
- PDPNMsgRemovePlayerFromGroup = ^TDPNMsgRemovePlayerFromGroup;
- _DPNMSG_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;
- {$EXTERNALSYM _DPNMSG_REMOVE_PLAYER_FROM_GROUP}
- DPNMSG_REMOVE_PLAYER_FROM_GROUP = _DPNMSG_REMOVE_PLAYER_FROM_GROUP;
- {$EXTERNALSYM DPNMSG_REMOVE_PLAYER_FROM_GROUP}
- TDPNMsgRemovePlayerFromGroup = _DPNMSG_REMOVE_PLAYER_FROM_GROUP;
- //
- // Returned buffer structure for message handler
- // (DPN_MSGID_RETURN_BUFFER)
- //
- PDPNMsgReturnBuffer = ^TDPNMsgReturnBuffer;
- _DPNMSG_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;
- {$EXTERNALSYM _DPNMSG_RETURN_BUFFER}
- DPNMSG_RETURN_BUFFER = _DPNMSG_RETURN_BUFFER;
- {$EXTERNALSYM DPNMSG_RETURN_BUFFER}
- TDPNMsgReturnBuffer = _DPNMSG_RETURN_BUFFER;
- //
- // Send complete structure for message handler
- // (DPN_MSGID_SEND_COMPLETE)
- //
- PDPNMsgSendComplete = ^TDPNMsgSendComplete;
- _DPNMSG_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
- // Fields added for DirectX 9
- dwFirstFrameRTT: DWORD; // RTT of the first frame in the message
- dwFirstFrameRetryCount: DWORD; // Retry count of the first frame
- dwSendCompleteFlags: DWORD; // Flags describing how message was sent
- pBuffers: PDPNBufferDesc; // Pointer to array of buffers sent, if DirectPlay did not make a copy
- dwNumBuffers: DWORD; // Number of buffers in previous array
- end;
- {$EXTERNALSYM _DPNMSG_SEND_COMPLETE}
- DPNMSG_SEND_COMPLETE = _DPNMSG_SEND_COMPLETE;
- {$EXTERNALSYM DPNMSG_SEND_COMPLETE}
- TDPNMsgSendComplete = _DPNMSG_SEND_COMPLETE;
- //
- // Server info structure for message handler
- // (DPN_MSGID_SERVER_INFO)
- //
- PDPNMsgServerInfo = ^TDPNMsgServerInfo;
- _DPNMSG_SERVER_INFO = packed record
- dwSize: DWORD; // Size of this structure
- dpnidServer: TDPNID; // DPNID of server
- pvPlayerContext: Pointer; // Player context value
- end;
- {$EXTERNALSYM _DPNMSG_SERVER_INFO}
- DPNMSG_SERVER_INFO = _DPNMSG_SERVER_INFO;
- {$EXTERNALSYM DPNMSG_SERVER_INFO}
- TDPNMsgServerInfo = _DPNMSG_SERVER_INFO;
- //
- // Terminated session structure for message handler
- // (DPN_MSGID_TERMINATE_SESSION)
- //
- PDPNMsgTerminateSession = ^TDPNMsgTerminateSession;
- _DPNMSG_TERMINATE_SESSION = packed record
- dwSize: DWORD; // Size of this structure
- hResultCode: HRESULT; // Reason
- pvTerminateData: Pointer; // Data passed from Host/Server
- dwTerminateDataSize: DWORD; // Size (in bytes) of pvTerminateData
- end;
- {$EXTERNALSYM _DPNMSG_TERMINATE_SESSION}
- DPNMSG_TERMINATE_SESSION = _DPNMSG_TERMINATE_SESSION;
- {$EXTERNALSYM DPNMSG_TERMINATE_SESSION}
- TDPNMsgTerminateSession = _DPNMSG_TERMINATE_SESSION;
- //
- // Message structures added for DirectX 9
- //
- //
- // Create thread info structure for message handler
- // (DPN_MSGID_CREATE_THREAD)
- //
- PDPNMsgCreateThread = ^TDPNMsgCreateThread;
- _DPNMSG_CREATE_THREAD = packed record
- dwSize: DWORD; // Size of this structure
- dwFlags: DWORD; // Flags describing this thread
- dwProcessorNum: DWORD; // Index of processor to which thread is bound
- pvUserContext: Pointer; // Thread context value
- end;
- {$EXTERNALSYM _DPNMSG_CREATE_THREAD}
- DPNMSG_CREATE_THREAD = _DPNMSG_CREATE_THREAD;
- {$EXTERNALSYM DPNMSG_CREATE_THREAD}
- TDPNMsgCreateThread = _DPNMSG_CREATE_THREAD;
- //
- // Destroy thread info structure for message handler
- // (DPN_MSGID_DESTROY_THREAD)
- //
- PDPNMsgDestroyThread = ^TDPNMsgDestroyThread;
- _DPNMSG_DESTROY_THREAD = packed record
- dwSize: DWORD; // Size of this structure
- dwProcessorNum: DWORD; // Index of processor to which thread was bound
- pvUserContext: Pointer; // Thread context value
- end;
- {$EXTERNALSYM _DPNMSG_DESTROY_THREAD}
- DPNMSG_DESTROY_THREAD = _DPNMSG_DESTROY_THREAD;
- {$EXTERNALSYM DPNMSG_DESTROY_THREAD}
- TDPNMsgDestroyThread = _DPNMSG_DESTROY_THREAD;
- //
- // Query-to-resolve-NAT-address structure for message handler
- // (DPN_MSGID_NAT_RESOLVER_QUERY)
- //
- PDPNMsgNatResolverQuery = ^TDPNMsgNatResolverQuery;
- _DPNMSG_NAT_RESOLVER_QUERY = packed record
- dwSize: DWORD; // Size of this structure.
- pAddressSender: IDirectPlay8Address; // Address of client that sent the query
- pAddressDevice: IDirectPlay8Address; // Address of device on which query was received
- pwszUserString: PWideChar; // User specified string, or NULL if none
- end;
- {$EXTERNALSYM _DPNMSG_NAT_RESOLVER_QUERY}
- DPNMSG_NAT_RESOLVER_QUERY = _DPNMSG_NAT_RESOLVER_QUERY;
- {$EXTERNALSYM DPNMSG_NAT_RESOLVER_QUERY}
- TDPNMsgNatResolverQuery = _DPNMSG_NAT_RESOLVER_QUERY;
- (****************************************************************************
- *
- * DirectPlay8 Functions
- *
- ****************************************************************************)
- (*
- * This function is no longer supported. It is recommended that CoCreateInstance be used to create
- * DirectPlay8 objects.
- *
- * extern HRESULT WINAPI DirectPlay8Create( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown);
- *
- *)
-
- (****************************************************************************
- *
- * DirectPlay8Lobby Interface Pointer
- *
- ****************************************************************************)
- IDirectPlay8LobbiedApplication = interface;
- (****************************************************************************
- *
- * DirectPlay8 Application Interfaces
- *
- ****************************************************************************)
- //
- // COM definition for DirectPlay8 Client interface
- //
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlay8Client);'}
- {$EXTERNALSYM IDirectPlay8Client}
- IDirectPlay8Client = interface(IUnknown)
- ['{5102dacd-241b-11d3-aea7-006097b01411}']
- (*** IDirectPlay8Client methods ***)
- function Initialize(pvUserContext: Pointer; pfn: TFNDPNMessageHandler; dwFlags: DWORD): HResult; stdcall;
- function EnumServiceProviders(pguidServiceProvider, pguidApplication: PGUID;
- pSPInfoBuffer: PDPNServiceProviderInfo; out pcbEnumData, pcReturned: DWORD;
- dwFlags: DWORD): HResult; stdcall;
- function EnumHosts(const pApplicationDesc: TDPNApplicationDesc;
- pAddrHost, pDeviceInfo: IDirectPlay8Address; pUserEnumData: Pointer;
- dwUserEnumDataSize, dwEnumCount, dwRetryInterval, dwTimeOut: DWORD;
- pvUserContext: Pointer; pAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function CancelAsyncOperation(hAsyncHandle: TDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function Connect(const pdnAppDesc: TDPNApplicationDesc;
- pHostAddr: IDirectPlay8Address; pDeviceInfo: IDirectPlay8Address;
- pdnSecurity: PDPNSecurityDesc; pdnCredentials: PDPNSecurityCredentials;
- pvUserConnectData: Pointer; dwUserConnectDataSize: DWORD; pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function Send(const prgBufferDesc: TDPNBufferDesc; cBufferDesc, dwTimeOut: DWORD;
- pvAsyncContext: Pointer; phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetSendQueueInfo(pdwNumMsgs, pdwNumBytes: PDWORD; dwFlags: DWORD): HResult; stdcall;
- function GetApplicationDesc(pAppDescBuffer: PDPNApplicationDesc; var pcbDataSize: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetClientInfo(const pdpnPlayerInfo: TDPNPlayerInfo; pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetServerInfo(pdpnPlayerInfo: PDPNPlayerInfo; var pdwSize: DWORD; dwFlags: DWORD): HResult; stdcall;
- function GetServerAddress(out pAddress: IDirectPlay8Address; dwFlags: DWORD): HResult; stdcall;
- function Close(dwFlags: DWORD): HResult; stdcall;
- function ReturnBuffer(hBufferHandle: TDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetCaps(pdpCaps: PDPNCaps; dwFlags: DWORD): HResult; stdcall; //Translator: pdpCaps can be either PDPNCaps or PDPNCapsEx
- function SetCaps(pdpCaps: PDPNCaps; dwFlags: DWORD): HResult; stdcall; //Translator: pdpCaps can be either PDPNCaps or PDPNCapsEx
- function SetSPCaps(const pguidSP: TGUID; const pdpspCaps: TDPNSpCaps; dwFlags: DWORD): HResult; stdcall;
- function GetSPCaps(const pguidSP: TGUID; var pdpspCaps: TDPNSpCaps; dwFlags: DWORD): HResult; stdcall;
- function GetConnectionInfo(var pdpConnectionInfo: TDPNConnectionInfo; dwFlags: DWORD): HResult; stdcall;
- function RegisterLobby(dpnHandle: TDPNHandle; pIDP8LobbiedApplication: IDirectPlay8LobbiedApplication; dwFlags: DWORD): HResult; stdcall;
- end;
- //
- // COM definition for DirectPlay8 Server interface
- //
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlay8Server);'}
- {$EXTERNALSYM IDirectPlay8Server}
- IDirectPlay8Server = interface(IUnknown)
- ['{5102dace-241b-11d3-aea7-006097b01411}']
- (*** IDirectPlay8Server methods ***)
- function Initialize(pvUserContext: Pointer; pfn: TFNDPNMessageHandler; dwFlags: DWORD): HResult; stdcall;
- function EnumServiceProviders(pguidServiceProvider, pguidApplication: PGUID;
- pSPInfoBuffer: PDPNServiceProviderInfo; out pcbEnumData, pcReturned: DWORD;
- dwFlags: DWORD): HResult; stdcall;
- function CancelAsyncOperation(hAsyncHandle: TDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetSendQueueInfo(dpnid: TDPNID; pdwNumMsgs, pdwNumBytes: PDWORD; dwFlags: DWORD): HResult; stdcall;
- function GetApplicationDesc(pAppDescBuffer: PDPNApplicationDesc; var pcbDataSize: DWORD; dwFlags: DWORD): HResult; stdcall;
- function GetServerInfo(pdpnPlayerInfo: PDPNPlayerInfo; pvAsyncContext: Pointer; phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetClientInfo(dpnid: TDPNID; pdpnPlayerInfo: PDPNPlayerInfo; pdwSize: PDWORD; dwFlags: DWORD): HResult; stdcall;
- function GetClientAddress(dpnid: TDPNID; out pAddress: IDirectPlay8Address; dwFlags: DWORD): HResult; stdcall;
- function GetLocalHostAddresses(out prgpAddress: IDirectPlay8Address; var pcAddress: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetApplicationDesc(const pad: TDPNApplicationDesc; dwFlags: DWORD): HResult; stdcall;
- function Host(const pdnAppDesc: TDPNApplicationDesc; prgpDeviceInfo: PIDirectPlay8Address;
- cDeviceInfo: DWORD; pdnSecurity: PDPNSecurityDesc; pdnCredentials: PDPNSecurityCredentials;
- pvPlayerContext: Pointer; dwFlags: DWORD): HResult; stdcall;
- function SendTo(dpnid: TDPNID; const prgBufferDesc: TDPNBufferDesc; cBufferDesc, dwTimeOut: DWORD;
- pvAsyncContext: Pointer; phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function CreateGroup(const pdpnGroupInfo: TDPNGroupInfo; pvGroupContext, pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function DestroyGroup(idGroup: TDPNID; pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function AddPlayerToGroup(idGroup, idClient: TDPNID; pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function RemovePlayerFromGroup(idGroup, idClient: TDPNID; pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function SetGroupInfo(dpnid: TDPNID; const pdpnGroupInfo: TDPNGroupInfo; pvAsyncContext: Pointer; phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetGroupInfo(dpnid: TDPNID; pdpnGroupInfo: PDPNGroupInfo; pdwSize: PDWORD; dwFlags: DWORD): HResult; stdcall; //todo: Changed
- function EnumPlayersAndGroups(prgdpnid: PDPNID; var pcdpnid: DWORD; dwFlags: DWORD): HResult; stdcall;
- function EnumGroupMembers(dpnid: TDPNID; prgdpnid: PDPNID; var pcdpnid: DWORD; dwFlags: DWORD): HResult; stdcall;
- function Close(dwFlags: DWORD): HResult; stdcall;
- function DestroyClient(dpnidClient: TDPNID; pvDestroyData: Pointer; dwDestroyDataSize: DWORD; dwFlags: DWORD): HResult; stdcall;
- function ReturnBuffer(hBufferHandle: TDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetPlayerContext(dpnid: TDPNID; out ppvPlayerContext: Pointer; dwFlags: DWORD): HResult; stdcall;
- function GetGroupContext(dpnid: TDPNID; out ppvGroupContext: Pointer; dwFlags: DWORD): HResult; stdcall;
- function GetCaps(pdpCaps: PDPNCaps; dwFlags: DWORD): HResult; stdcall; //Translator: pdpCaps can be either PDPNCaps or PDPNCapsEx
- function SetCaps(pdpCaps: PDPNCaps; dwFlags: DWORD): HResult; stdcall; //Translator: pdpCaps can be either PDPNCaps or PDPNCapsEx
- function SetSPCaps(const pguidSP: TGUID; const pdpspCaps: TDPNSpCaps; dwFlags: DWORD): HResult; stdcall;
- function GetSPCaps(const pguidSP: TGUID; var pdpspCaps: TDPNSpCaps; dwFlags: DWORD): HResult; stdcall;
- function GetConnectionInfo(dpnid: TDPNID; var pdpConnectionInfo: TDPNConnectionInfo; dwFlags: DWORD): HResult; stdcall;
- function RegisterLobby(dpnHandle: TDPNHandle; pIDP8LobbiedApplication: IDirectPlay8LobbiedApplication; dwFlags: DWORD): HResult; stdcall;
- end;
- //
- // COM definition for DirectPlay8 Peer interface
- //
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlay8Peer);'}
- {$EXTERNALSYM IDirectPlay8Peer}
- IDirectPlay8Peer = interface(IUnknown)
- ['{5102dacf-241b-11d3-aea7-006097b01411}']
- (*** IDirectPlay8Peer methods ***)
- function Initialize(pvUserContext: Pointer; pfn: TFNDPNMessageHandler; dwFlags: DWORD): HResult; stdcall;
- function EnumServiceProviders(pguidServiceProvider, pguidApplication: PGUID;
- pSPInfoBuffer: PDPNServiceProviderInfo; out pcbEnumData, pcReturned: DWORD;
- dwFlags: DWORD): HResult; stdcall;
- function CancelAsyncOperation(hAsyncHandle: TDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function Connect(const pdnAppDesc: TDPNApplicationDesc;
- pHostAddr: IDirectPlay8Address; pDeviceInfo: IDirectPlay8Address;
- pdnSecurity: PDPNSecurityDesc; pdnCredentials: PDPNSecurityCredentials;
- pvUserConnectData: Pointer; dwUserConnectDataSize: DWORD;
- pvPlayerContext, pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function SendTo(dpnid: TDPNID; const prgBufferDesc: TDPNBufferDesc; cBufferDesc, dwTimeOut: DWORD;
- pvAsyncContext: Pointer; phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetSendQueueInfo(dpnid: TDPNID; pdwNumMsgs, pdwNumBytes: PDWORD; dwFlags: DWORD): HResult; stdcall;
- function Host(const pdnAppDesc: TDPNApplicationDesc; prgpDeviceInfo: PIDirectPlay8Address;
- cDeviceInfo: DWORD; pdnSecurity: PDPNSecurityDesc; pdnCredentials: PDPNSecurityCredentials;
- pvPlayerContext: Pointer; dwFlags: DWORD): HResult; stdcall;
- function GetApplicationDesc(pAppDescBuffer: PDPNApplicationDesc; var pcbDataSize: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetApplicationDesc(const pad: TDPNApplicationDesc; dwFlags: DWORD): HResult; stdcall;
- function CreateGroup(const pdpnGroupInfo: TDPNGroupInfo; pvGroupContext, pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function DestroyGroup(idGroup: TDPNID; pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function AddPlayerToGroup(idGroup, idClient: TDPNID; pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function RemovePlayerFromGroup(idGroup, idClient: TDPNID; pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function SetGroupInfo(dpnid: TDPNID; const pdpnGroupInfo: TDPNGroupInfo; pvAsyncContext: Pointer; phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetGroupInfo(dpnid: TDPNID; pdpnGroupInfo: PDPNGroupInfo; pdwSize: PDWORD; dwFlags: DWORD): HResult; stdcall; //todo: Changed
- function EnumPlayersAndGroups(prgdpnid: PDPNID; var pcdpnid: DWORD; dwFlags: DWORD): HResult; stdcall;
- function EnumGroupMembers(dpnid: TDPNID; prgdpnid: PDPNID; var pcdpnid: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetPeerInfo(const pdpnPlayerInfo: TDPNPlayerInfo; pvAsyncContext: Pointer;
- phAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetPeerInfo(dpnid: TDPNID; var pdpnPlayerInfo: TDPNPlayerInfo; pdwSize: PDWORD; dwFlags: DWORD): HResult; stdcall; //todo: Changed
- function GetPeerAddress(dpnid: TDPNID; out pAddress: IDirectPlay8Address; dwFlags: DWORD): HResult; stdcall;
- function GetLocalHostAddresses(prgpAddress: PIDirectPlay8Address; var pcAddress: DWORD; dwFlags: DWORD): HResult; stdcall;
- function Close(dwFlags: DWORD): HResult; stdcall;
- function EnumHosts(const pApplicationDesc: TDPNApplicationDesc;
- pAddrHost, pDeviceInfo: IDirectPlay8Address; pUserEnumData: Pointer;
- dwUserEnumDataSize, dwEnumCount, dwRetryInterval, dwTimeOut: DWORD;
- pvUserContext: Pointer; pAsyncHandle: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function DestroyPeer(dpnidClient: TDPNID; pvDestroyData: Pointer; dwDestroyDataSize, dwFlags: DWORD): HResult; stdcall;
- function ReturnBuffer(hBufferHandle: TDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function GetPlayerContext(dpnid: TDPNID; out ppvPlayerContext: Pointer; dwFlags: DWORD): HResult; stdcall;
- function GetGroupContext(dpnid: TDPNID; out ppvGroupContext: Pointer; dwFlags: DWORD): HResult; stdcall;
- function GetCaps(pdpCaps: PDPNCaps; dwFlags: DWORD): HResult; stdcall; //Translator: pdpCaps can be either PDPNCaps or PDPNCapsEx
- function SetCaps(pdpCaps: PDPNCaps; dwFlags: DWORD): HResult; stdcall; //Translator: pdpCaps can be either PDPNCaps or PDPNCapsEx
- function SetSPCaps(const pguidSP: TGUID; const pdpspCaps: TDPNSpCaps; dwFlags: DWORD): HResult; stdcall;
- function GetSPCaps(const pguidSP: TGUID; var pdpspCaps: TDPNSpCaps; dwFlags: DWORD): HResult; stdcall;
- function GetConnectionInfo(dpnid: TDPNID; var pdpConnectionInfo: TDPNConnectionInfo; dwFlags: DWORD): HResult; stdcall;
- function RegisterLobby(dpnHandle: TDPNHandle; pIDP8LobbiedApplication: IDirectPlay8LobbiedApplication; dwFlags: DWORD): HResult; stdcall;
- function TerminateSession(pvTerminateData: Pointer; dwTerminateDataSize, dwFlags: DWORD): HResult; stdcall;
- end;