// H to Pas Converter Ver.0.9.0.11
//     Date : 1998/04/19
//   Source : dplobby.h

unit dplobby;

//{$X+}//{$Z2}

interface

uses Windows, Ole2, DPlay;

{==========================================================================;
 *
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
 *
 *  File:       dplobby.h
 *  Content:    DirectPlayLobby include file
 **************************************************************************}
//{$IFNDEF __DPLOBBY_INCLUDED__}
//{$DEFINE __DPLOBBY_INCLUDED__}

// Error :  #include 'dplay.h'

//{$IFDEF __cplusplus}
// Error : extern "C" {
//{$ENDIF}{ __cplusplus }

{
 * GUIDS used by DirectPlay objects
 }

 {AF465C71-9588-11cf-A020-00AA006157AC}
const
  IID_IDirectPlayLobby: TGUID = (
    D1:$af465c71;D2:$9588;D3:$11cf;D4:($a0,$20,$0,$aa,$0,$61,$57,$ac));
 {26C66A70-B367-11cf-A024-00AA006157AC}
  IID_IDirectPlayLobbyA: TGUID = (
    D1:$26c66a70;D2:$b367;D3:$11cf;D4:($a0,$24,$0,$aa,$0,$61,$57,$ac));
 {0194C220-A303-11d0-9C4F-00A0C905425E}
  IID_IDirectPlayLobby2: TGUID = (
    D1:$194c220;D2:$a303;D3:$11d0;D4:($9c,$4f,$0,$a0,$c9,$5,$42,$5e));
 {1BB4AF80-A303-11d0-9C4F-00A0C905425E}
  IID_IDirectPlayLobby2A: TGUID = (
    D1:$1bb4af80;D2:$a303;D3:$11d0;D4:($9c,$4f,$0,$a0,$c9,$5,$42,$5e));
 {2FE8F810-B2A5-11d0-A787-0000F803ABFC} 
  CLSID_DirectPlayLobby: TGUID = (
    D1:$2fe8f810;D2:$b2a5;D3:$11d0;D4:($a7,$87,$0,$0,$f8,$3,$ab,$fc));


{***************************************************************************
 *
 * IDirectPlayLobby Structures
 *
 * Various structures used to invoke DirectPlayLobby.
 *
 ***************************************************************************}

type
  IDirectPlayLobby = class;
  IDirectPlayLobby2 = class;

  LPDIRECTPLAYLOBBY	= IDirectPlayLobby;
  LPDIRECTPLAYLOBBYA	= IDirectPlayLobby;
  IDirectPlayLobbyA	= IDirectPlayLobby;

  LPDIRECTPLAYLOBBY2	= IDirectPlayLobby2;
  LPDIRECTPLAYLOBBY2A	= IDirectPlayLobby2;
  IDirectPlayLobby2A	= IDirectPlayLobby2;


{
 * DPLAPPINFO
 * Used to hold information about a registered DirectPlay
 * application
 }
  LPDPLAPPINFO	= ^DPLAPPINFO;
  DPLAPPINFO = record
	dwSize	: DWORD;	// Size of this structure
	guidApplication	: TGUID;	// GUID of the Application

	case Integer of
	0: (
	  lpszAppNameA	: LPSTR;
	);
	1: (
	  lpszAppName	: LPWSTR;
	);
  end;

{
 * LPCDPLAPPINFO
 * A constant pointer to DPLAPPINFO
 }
  LPCDPLAPPINFO	= ^DPLAPPINFO;

{
 * DPCOMPOUNDADDRESSELEMENT
 *
 * An array of these is passed to CreateCompoundAddresses()
 }
  LPDPCOMPOUNDADDRESSELEMENT	= ^DPCOMPOUNDADDRESSELEMENT;
  DPCOMPOUNDADDRESSELEMENT = record
	guidDataType	: TGUID;
	dwDataSize	: DWORD;
	lpData	: Pointer;
  end;

{
 * LPCDPCOMPOUNDADDRESSELEMENT
 * A constant pointer to DPCOMPOUNDADDRESSELEMENT
 }
  LPCDPCOMPOUNDADDRESSELEMENT	= ^DPCOMPOUNDADDRESSELEMENT;


{***************************************************************************
 *
 * Enumeration Method Callback Prototypes
 *
 ***************************************************************************}

{
 * Callback for EnumAddress()
 }
  LPDPENUMADDRESSCALLBACK =   function (guidDataType: TGUID; dwDataSize: DWORD; lpData: pointer;//LPCVOID; 
	 lpContext: Pointer): BOOL; stdcall;

{
 * Callback for EnumAddressTypes()
 }
  LPDPLENUMADDRESSTYPESCALLBACK =   function (guidDataType: TGUID; lpContext: Pointer; 
	 dwFlags: DWORD): BOOL; stdcall;

{
 * Callback for EnumLocalApplications()
 }
  LPDPLENUMLOCALAPPLICATIONSCALLBACK =   function (lpAppInfo: LPCDPLAPPINFO; lpContext: Pointer; 
	 dwFlags: DWORD): BOOL; stdcall;

  IDirectPlayLobby = class ( IUnknown )
{  IUnknown Methods	}
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

{  IDirectPlayLobby Methods	}
    function Connect(Para0: DWORD; var Para1: IDIRECTPLAY2; var Para2: IUnknown): HRESULT; virtual; stdcall; abstract;
    function CreateAddress(Para0: TGUID; Para1: TGUID; Para2: pointer{LPCVOID}; Para3: DWORD;
	 Para4: Pointer; Para5: LPDWORD): HRESULT; virtual; stdcall; abstract;
    function EnumAddress(Para0: LPDPENUMADDRESSCALLBACK; Para1: pointer{LPCVOID}; Para2: DWORD;
	 Para3: Pointer): HRESULT; virtual; stdcall; abstract;
    function EnumAddressTypes(Para0: LPDPLENUMADDRESSTYPESCALLBACK; Para1: TGUID;
	 Para2: Pointer; Para3: DWORD): HRESULT; virtual; stdcall; abstract;
    function EnumLocalApplications(Para0: LPDPLENUMLOCALAPPLICATIONSCALLBACK; Para1: Pointer;
	 Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetConnectionSettings(Para0: DWORD; Para1: Pointer; Para2: LPDWORD): HRESULT; virtual; stdcall; abstract;
    function ReceiveLobbyMessage(Para0: DWORD; Para1: DWORD; Para2: LPDWORD; Para3: Pointer;
	 Para4: LPDWORD): HRESULT; virtual; stdcall; abstract;
    function RunApplication(Para0: DWORD; Para1: LPDWORD; Para2: LPDPLCONNECTION; 
	 Para3: THANDLE): HRESULT; virtual; stdcall; abstract;
    function SendLobbyMessage(Para0: DWORD; Para1: DWORD; Para2: Pointer; Para3: DWORD): HRESULT; virtual; stdcall; abstract;
    function SetConnectionSettings(Para0: DWORD; Para1: DWORD; Para2: LPDPLCONNECTION): HRESULT; virtual; stdcall; abstract;
    function SetLobbyMessageEvent(Para0: DWORD; Para1: DWORD; Para2: THANDLE): HRESULT; virtual; stdcall; abstract;

  end;

{***************************************************************************
 *
 * IDirectPlayLobby2 (and IDirectPlayLobby2A) Interface
 *
 ***************************************************************************}
//{$UNDEF INTERFACE}
// Error :  #define INTERFACE IDirectPlayLobby2
  IDirectPlayLobby2 = class ( IDirectPlayLobby )
{  IUnknown Methods	}
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

{  IDirectPlayLobby Methods	}
    //function Connect(Para0: DWORD; var Para1: LPDIRECTPLAY2; var Para2: IUnknown): HRESULT; virtual; stdcall; abstract;
    //function CreateAddress(Para0: TGUID; Para1: TGUID; Para2: pointer{LPCVOID}; Para3: DWORD;
    //	 Para4: Pointer; Para5: LPDWORD): HRESULT; virtual; stdcall; abstract;
    //function EnumAddress(Para0: LPDPENUMADDRESSCALLBACK; Para1: pointer{LPCVOID}; Para2: DWORD;
    //	 Para3: Pointer): HRESULT; virtual; stdcall; abstract;
    //function EnumAddressTypes(Para0: LPDPLENUMADDRESSTYPESCALLBACK; Para1: TGUID;
    //	 Para2: Pointer; Para3: DWORD): HRESULT; virtual; stdcall; abstract;
    //function EnumLocalApplications(Para0: LPDPLENUMLOCALAPPLICATIONSCALLBACK; Para1: Pointer;
    //	 Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    //function GetConnectionSettings(Para0: DWORD; Para1: Pointer; Para2: LPDWORD): HRESULT; virtual; stdcall; abstract;
    //function ReceiveLobbyMessage(Para0: DWORD; Para1: DWORD; Para2: LPDWORD; Para3: Pointer;
    //	 Para4: LPDWORD): HRESULT; virtual; stdcall; abstract;
    //function RunApplication(Para0: DWORD; Para1: LPDWORD; Para2: LPDPLCONNECTION;
    //	 Para3: THANDLE): HRESULT; virtual; stdcall; abstract;
    //function SendLobbyMessage(Para0: DWORD; Para1: DWORD; Para2: Pointer; Para3: DWORD): HRESULT; virtual; stdcall; abstract;
    //function SetConnectionSettings(Para0: DWORD; Para1: DWORD; Para2: LPDPLCONNECTION): HRESULT; virtual; stdcall; abstract;
    //function SetLobbyMessageEvent(Para0: DWORD; Para1: DWORD; Para2: THANDLE): HRESULT; virtual; stdcall; abstract;

{  IDirectPlayLobby2 Methods	}
    function CreateCompoundAddress(Para0: LPCDPCOMPOUNDADDRESSELEMENT; Para1: DWORD;
	 Para2: Pointer; Para3: LPDWORD): HRESULT; virtual; stdcall; abstract;
  end;


{***************************************************************************
 *
 * DirectPlayLobby API Prototypes
 *
 ***************************************************************************}
//{$IFDEF UNICODE}
//const
//  DirectPlayLobbyCreate	= DirectPlayLobbyCreateW;
//{$ELSE}

//{$ENDIF}{ UNICODE }

  function DirectPlayLobbyCreateW(Para1: PGUID; var Para2: LPDIRECTPLAYLOBBY; var Para3: IUnknown;
	 Para4: Pointer; Para5: DWORD): HRESULT; stdcall;
  function DirectPlayLobbyCreateA(Para1: PGUID; var Para2: LPDIRECTPLAYLOBBYA; var Para3: IUnknown; 
	 Para4: Pointer; Para5: DWORD): HRESULT; stdcall;

  function DirectPlayLobbyCreate(Para1: PGUID; var Para2: LPDIRECTPLAYLOBBYA; var Para3: IUnknown; 
	 Para4: Pointer; Para5: DWORD): HRESULT; stdcall;


//  DirectPlayLobbyCreate	= DirectPlayLobbyCreateA;
{***************************************************************************
 *
 * IDirectPlayLobby (and IDirectPlayLobbyA) Interface
 *
 ***************************************************************************}
//{$UNDEF INTERFACE}
// Error :  #define INTERFACE IDirectPlayLobby

{***************************************************************************
 *
 * IDirectPlayLobby interface macros
 *
 ***************************************************************************}

// Error : //{$IFNDEF __cplusplus} || defined ( CINTERFACE )

// Error :  #define IDirectPlayLobby_QueryInterface ( p , a , b ) ( p ) - > lpVtbl - > QueryInterface ( p , a , b )
// Error :  #define IDirectPlayLobby_AddRef ( p ) ( p ) - > lpVtbl - > AddRef ( p )
// Error :  #define IDirectPlayLobby_Release ( p ) ( p ) - > lpVtbl - > Release ( p )
// Error :  #define IDirectPlayLobby_Connect ( p , a , b , c ) ( p ) - > lpVtbl - > Connect ( p , a , b , c )
// Error :  #define IDirectPlayLobby_CreateAddress ( p , a , b , c , d , e , f ) ( p ) - > lpVtbl - > CreateAddress ( p , a , b , c , d , e , f )
// Error :  #define IDirectPlayLobby_CreateCompoundAddress ( p , a , b , c , d ) ( p ) - > lpVtbl - > CreateCompoundAddress ( p , a , b , c , d )
// Error :  #define IDirectPlayLobby_EnumAddress ( p , a , b , c , d ) ( p ) - > lpVtbl - > EnumAddress ( p , a , b , c , d )
// Error :  #define IDirectPlayLobby_EnumAddressTypes ( p , a , b , c , d ) ( p ) - > lpVtbl - > EnumAddressTypes ( p , a , b , c , d )
// Error :  #define IDirectPlayLobby_EnumLocalApplications ( p , a , b , c ) ( p ) - > lpVtbl - > EnumLocalApplications ( p , a , b , c )
// Error :  #define IDirectPlayLobby_GetConnectionSettings ( p , a , b , c ) ( p ) - > lpVtbl - > GetConnectionSettings ( p , a , b , c )
// Error :  #define IDirectPlayLobby_ReceiveLobbyMessage ( p , a , b , c , d , e ) ( p ) - > lpVtbl - > ReceiveLobbyMessage ( p , a , b , c , d , e )
// Error :  #define IDirectPlayLobby_RunApplication ( p , a , b , c , d ) ( p ) - > lpVtbl - > RunApplication ( p , a , b , c , d )
// Error :  #define IDirectPlayLobby_SendLobbyMessage ( p , a , b , c , d ) ( p ) - > lpVtbl - > SendLobbyMessage ( p , a , b , c , d )
// Error :  #define IDirectPlayLobby_SetConnectionSettings ( p , a , b , c ) ( p ) - > lpVtbl - > SetConnectionSettings ( p , a , b , c )
// Error :  #define IDirectPlayLobby_SetLobbyMessageEvent ( p , a , b , c ) ( p ) - > lpVtbl - > SetLobbyMessageEvent ( p , a , b , c )

//{$ELSE}{ C++ }

// Error :  #define IDirectPlayLobby_QueryInterface ( p , a , b ) ( p ) - > QueryInterface ( a , b )
// Error :  #define IDirectPlayLobby_AddRef ( p ) ( p ) - > AddRef ( )
// Error :  #define IDirectPlayLobby_Release ( p ) ( p ) - > Release ( )
// Error :  #define IDirectPlayLobby_Connect ( p , a , b , c ) ( p ) - > Connect ( a , b , c )
// Error :  #define IDirectPlayLobby_CreateAddress ( p , a , b , c , d , e , f ) ( p ) - > CreateAddress ( a , b , c , d , e , f )
// Error :  #define IDirectPlayLobby_CreateCompoundAddress ( p , a , b , c , d ) ( p ) - > lpVtbl - > CreateCompoundAddress ( a , b , c , d )
// Error :  #define IDirectPlayLobby_EnumAddress ( p , a , b , c , d ) ( p ) - > EnumAddress ( a , b , c , d )
// Error :  #define IDirectPlayLobby_EnumAddressTypes ( p , a , b , c , d ) ( p ) - > EnumAddressTypes ( a , b , c , d )
// Error :  #define IDirectPlayLobby_EnumLocalApplications ( p , a , b , c ) ( p ) - > EnumLocalApplications ( a , b , c )
// Error :  #define IDirectPlayLobby_GetConnectionSettings ( p , a , b , c ) ( p ) - > GetConnectionSettings ( a , b , c )
// Error :  #define IDirectPlayLobby_ReceiveLobbyMessage ( p , a , b , c , d , e ) ( p ) - > ReceiveLobbyMessage ( a , b , c , d , e )
// Error :  #define IDirectPlayLobby_RunApplication ( p , a , b , c , d ) ( p ) - > RunApplication ( a , b , c , d )
// Error :  #define IDirectPlayLobby_SendLobbyMessage ( p , a , b , c , d ) ( p ) - > SendLobbyMessage ( a , b , c , d )
// Error :  #define IDirectPlayLobby_SetConnectionSettings ( p , a , b , c ) ( p ) - > SetConnectionSettings ( a , b , c )
// Error :  #define IDirectPlayLobby_SetLobbyMessageEvent ( p , a , b , c ) ( p ) - > SetLobbyMessageEvent ( a , b , c )

//{$ENDIF}

const
{***************************************************************************
 *
 * DirectPlayLobby Flags
 *
 ***************************************************************************}

{
 *	This is a message flag used by ReceiveLobbyMessage.  It can be
 *	returned in the dwMessageFlags parameter to indicate a message from
 *	the system.
 }
  DPLMSG_SYSTEM	= $00000001;

{
 *	This is a message flag used by ReceiveLobbyMessage and SendLobbyMessage.
 *  It is used to indicate that the message is a standard lobby message.
 *  DPLMSG_SETPROPERTY, DPLMSG_SETPROPERTYRESPONSE, DPLMSG_GETPROPERTY,
 *	DPLMSG_GETPROPERTYRESPONSE
 }
  DPLMSG_STANDARD	= $00000002;


{***************************************************************************
 *
 * DirectPlayLobby messages and message data structures
 *
 * All system messages have a dwMessageFlags value of DPLMSG_SYSTEM returned
 * from a call to ReceiveLobbyMessage.
 *
 * All standard messages have a dwMessageFlags value of DPLMSG_STANDARD returned
 * from a call to ReceiveLobbyMessage.
 *
 ***************************************************************************}

{
 * DPLMSG_GENERIC
 * Generic message structure used to identify the message type.
 }
type
  LPDPLMSG_GENERIC	= ^DPLMSG_GENERIC;
  DPLMSG_GENERIC = record
	dwType	: DWORD;	// Message type
  end;

{
 *  DPLMSG_SETPROPERTY
 *  Standard message sent by an application to a lobby to set a
 *  property
 }
  LPDPLMSG_SETPROPERTY	= ^DPLMSG_SETPROPERTY;
  DPLMSG_SETPROPERTY = record
	dwType	: DWORD;	// Message type
	dwRequestID	: DWORD;	// Request ID (DPL_NOCONFIRMATION if no confirmation desired)
	guidPlayer	: TGUID;	// Player GUID
	guidPropertyTag	: TGUID;	// Property GUID
	dwDataSize	: DWORD;	// Size of data
	dwPropertyData	: array[0..0] of DWORD;	// Buffer containing data
  end;

const
  DPL_NOCONFIRMATION	= 0;

{
 *  DPLMSG_SETPROPERTYRESPONSE
 *  Standard message returned by a lobby to confirm a 
 *  DPLMSG_SETPROPERTY message.
 }
type
  LPDPLMSG_SETPROPERTYRESPONSE	= ^DPLMSG_SETPROPERTYRESPONSE;
  DPLMSG_SETPROPERTYRESPONSE = record
	dwType	: DWORD;	// Message type
	dwRequestID	: DWORD;	// Request ID
	guidPlayer	: TGUID;	// Player GUID
	guidPropertyTag	: TGUID;	// Property GUID
	hr	: HRESULT;	// Return Code
  end;

{
 *  DPLMSG_GETPROPERTY
 *  Standard message sent by an application to a lobby to request
 *	the current value of a property
 }
  LPDPLMSG_GETPROPERTY	= ^DPLMSG_GETPROPERTY;
  DPLMSG_GETPROPERTY = record
	dwType	: DWORD;	// Message type
	dwRequestID	: DWORD;	// Request ID
	guidPlayer	: TGUID;	// Player GUID
	guidPropertyTag	: TGUID;	// Property GUID
  end;

{
 *  DPLMSG_GETPROPERTYRESPONSE
 *  Standard message returned by a lobby in response to a
 *	DPLMSG_GETPROPERTY message.
 }
  LPDPLMSG_GETPROPERTYRESPONSE	= ^DPLMSG_GETPROPERTYRESPONSE;
  DPLMSG_GETPROPERTYRESPONSE = record
	dwType	: DWORD;	// Message type
	dwRequestID	: DWORD;	// Request ID
	guidPlayer	: TGUID;	// Player GUID
	guidPropertyTag	: TGUID;	// Property GUID
	hr	: HRESULT;	// Return Code
	dwDataSize	: DWORD;	// Size of data
	dwPropertyData	: array[0..0] of DWORD;	// Buffer containing data
  end;


{*****************************************
 *
 *	DirectPlay Lobby message dwType values
 *
 ****************************************}

{
 *  The application has read the connection settings.
 *  It is now O.K. for the lobby client to release
 *  its IDirectPlayLobby interface.
 }
const
  DPLSYS_CONNECTIONSETTINGSREAD	= $00000001;

{
 *  The application's call to DirectPlayConnect failed
 }
  DPLSYS_DPLAYCONNECTFAILED	= $00000002;

{
 *  The application has created a DirectPlay session.
 }
  DPLSYS_DPLAYCONNECTSUCCEEDED	= $00000003;

{
 *  The application has terminated.
 }
  DPLSYS_APPTERMINATED	= $00000004;

{
 *  The message is a DPLMSG_SETPROPERTY message.
 }
  DPLSYS_SETPROPERTY	= $00000005;

{
 *  The message is a DPLMSG_SETPROPERTYRESPONSE message.
 }
  DPLSYS_SETPROPERTYRESPONSE	= $00000006;

{
 *  The message is a DPLMSG_GETPROPERTY message.
 }
  DPLSYS_GETPROPERTY	= $00000007;

{
 *  The message is a DPLMSG_GETPROPERTYRESPONSE message.
 }
  DPLSYS_GETPROPERTYRESPONSE	= $00000008;


{***************************************************************************
 *
 * DirectPlay defined property GUIDs and associated data structures
 *
 ***************************************************************************}

{
 * DPLPROPERTY_MessagesSupported
 *
 * Request whether the lobby supports standard.  Lobby with respond with either
 * TRUE or FALSE or may not respond at all.
 * 
 * Property data is a single BOOL with TRUE or FALSE
 }
// {762CCDA1-D916-11d0-BA39-00C04FD7ED67}
  DPLPROPERTY_MessagesSupported: TGUID = (
    D1:$762ccda1;D2:$d916;D3:$11d0;D4:($ba,$39,$0,$c0,$4f,$d7,$ed,$67));

{
 * DPLPROPERTY_LobbyGuid
 *
 * Request the GUID that identifies the lobby software that the application
 * is communicating with.
 *
 * Property data is a single GUID.
 }
// {F56920A0-D218-11d0-BA39-00C04FD7ED67}
  DPLPROPERTY_LobbyGuid: TGUID = (
    D1:$f56920a0;D2:$d218;D3:$11d0;D4:($ba,$39,$0,$c0,$4f,$d7,$ed,$67));

{
 * DPLPROPERTY_PlayerGuid
 *
 * Request the GUID that identifies the player on this machine for sending
 * property data back to the lobby.
 *
 * Property data is the DPLDATA_PLAYERDATA structure
 }
// {B4319322-D20D-11d0-BA39-00C04FD7ED67}
  DPLPROPERTY_PlayerGuid: TGUID = (
    D1:$b4319322;D2:$d20d;D3:$11d0;D4:($ba,$39,$0,$c0,$4f,$d7,$ed,$67));

{
 * DPLDATA_PLAYERGUID
 *
 * Data structure to hold the GUID of the player and player creation flags
 * from the lobby.
 }
type
  LPDPLDATA_PLAYERGUID	= ^DPLDATA_PLAYERGUID;
  DPLDATA_PLAYERGUID = record
	guidPlayer	: TGUID;
	dwPlayerFlags	: DWORD;
  end;

{
 * DPLPROPERTY_PlayerScore
 *
 * Used to send an array of long integers to the lobby indicating the 
 * score of a player.
 *
 * Property data is the DPLDATA_PLAYERSCORE structure.
 }
// {48784000-D219-11d0-BA39-00C04FD7ED67}
const
  DPLPROPERTY_PlayerScore: TGUID = (
    D1:$48784000;D2:$d219;D3:$11d0;D4:($ba,$39,$0,$c0,$4f,$d7,$ed,$67));

{
 * DPLDATA_PLAYERSCORE
 *
 * Data structure to hold an array of long integers representing a player score.
 * Application must allocate enough memory to hold all the scores.
 }
type
  LPDPLDATA_PLAYERSCORE	= ^DPLDATA_PLAYERSCORE;
  DPLDATA_PLAYERSCORE = record
	dwScoreCount	: DWORD;
	Score	: array[0..0] of LongInt;
  end;

{***************************************************************************
 *
 * DirectPlay Address ID's
 *
 ***************************************************************************}

{ DirectPlay Address
 *
 * A DirectPlay address consists of multiple chunks of data, each tagged
 * with a GUID signifying the type of data in the chunk. The chunk also
 * has a length so that unknown chunk types can be skipped.
 *
 * The EnumAddress() function is used to parse these address data chunks.
 }

{
 * DPADDRESS
 *
 * Header for block of address data elements
 }
  DPADDRESS = record
	guidDataType	: TGUID;
	dwDataSize	: DWORD;
  end;

  LPDPADDRESS	= ^DPADDRESS;

{
 * DPAID_TotalSize
 *
 * Chunk is a DWORD containing size of entire DPADDRESS structure
 }

// {1318F560-912C-11d0-9DAA-00A0C90A43CB}
const
  DPAID_TotalSize: TGUID = (
    D1:$1318f560;D2:$912c;D3:$11d0;D4:($9d,$aa,$0,$a0,$c9,$a,$43,$cb));

{
 * DPAID_ServiceProvider
 *
 * Chunk is a GUID describing the service provider that created the chunk.
 * All addresses must contain this chunk.
 }

// {07D916C0-E0AF-11cf-9C4E-00A0C905425E}
  DPAID_ServiceProvider: TGUID = (
    D1:$7d916c0;D2:$e0af;D3:$11cf;D4:($9c,$4e,$0,$a0,$c9,$5,$42,$5e));

{
 * DPAID_LobbyProvider
 *
 * Chunk is a GUID describing the lobby provider that created the chunk.
 * All addresses must contain this chunk.
 }

// {59B95640-9667-11d0-A77D-0000F803ABFC}
  DPAID_LobbyProvider: TGUID = (
    D1:$59b95640;D2:$9667;D3:$11d0;D4:($a7,$7d,$0,$0,$f8,$3,$ab,$fc));

{
 * DPAID_Phone and DPAID_PhoneW
 *
 * Chunk is a string containing a phone number (i.e. "1-800-555-1212")
 * in ANSI or UNICODE format
 }

// {78EC89A0-E0AF-11cf-9C4E-00A0C905425E}
  DPAID_Phone: TGUID = (
    D1:$78ec89a0;D2:$e0af;D3:$11cf;D4:($9c,$4e,$0,$a0,$c9,$5,$42,$5e));

// {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E}
  DPAID_PhoneW: TGUID = (
    D1:$ba5a7a70;D2:$9dbf;D3:$11d0;D4:($9c,$c1,$0,$a0,$c9,$5,$42,$5e));

{
 * DPAID_Modem and DPAID_ModemW
 *
 * Chunk is a string containing a modem name registered with TAPI
 * in ANSI or UNICODE format
 }

// {F6DCC200-A2FE-11d0-9C4F-00A0C905425E}
  DPAID_Modem: TGUID = (
    D1:$f6dcc200;D2:$a2fe;D3:$11d0;D4:($9c,$4f,$0,$a0,$c9,$5,$42,$5e));

// {01FD92E0-A2FF-11d0-9C4F-00A0C905425E}
  DPAID_ModemW: TGUID = (
    D1:$1fd92e0;D2:$a2ff;D3:$11d0;D4:($9c,$4f,$0,$a0,$c9,$5,$42,$5e));

{
 * DPAID_Inet and DPAID_InetW
 *
 * Chunk is a string containing a TCP/IP host name or an IP address
 * (i.e. "dplay.microsoft.com" or "137.55.100.173") in ANSI or UNICODE format
 }

// {C4A54DA0-E0AF-11cf-9C4E-00A0C905425E}
  DPAID_INet: TGUID = (
    D1:$c4a54da0;D2:$e0af;D3:$11cf;D4:($9c,$4e,$0,$a0,$c9,$5,$42,$5e));

// {E63232A0-9DBF-11d0-9CC1-00A0C905425E}
  DPAID_INetW: TGUID = (
    D1:$e63232a0;D2:$9dbf;D3:$11d0;D4:($9c,$c1,$0,$a0,$c9,$5,$42,$5e));

{
 * DPCOMPORTADDRESS
 *
 * Used to specify com port settings. The constants that define baud rate,
 * stop bits and parity are defined in WINBASE.H. The constants for flow
 * control are given below.
 }

  DPCPA_NOFLOW	= 0;	// no flow control
  DPCPA_XONXOFFFLOW	= 1;	// software flow control
  DPCPA_RTSFLOW	= 2;	// hardware flow control with RTS
  DPCPA_DTRFLOW	= 3;	// hardware flow control with DTR
  DPCPA_RTSDTRFLOW	= 4;	// hardware flow control with RTS and DTR

type
  DPCOMPORTADDRESS = record
	dwComPort	: DWORD;	// COM port to use (1-4)
	dwBaudRate	: DWORD;	// baud rate (100-256k)
	dwStopBits	: DWORD;	// no. stop bits (1-2)
	dwParity	: DWORD;	// parity (none, odd, even, mark)
	dwFlowControl	: DWORD;	// flow control (none, xon/xoff, rts, dtr)
  end;

  LPDPCOMPORTADDRESS	= ^DPCOMPORTADDRESS;

{
 * DPAID_ComPort
 *
 * Chunk contains a DPCOMPORTADDRESS structure defining the serial port.
 }

// {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E}
const
  DPAID_ComPort: TGUID = (
    D1:$f2f0ce00;D2:$e0af;D3:$11cf;D4:($9c,$4e,$0,$a0,$c9,$5,$42,$5e));

{***************************************************************************
 *
 * 	dplobby 1.0 obsolete definitions
 *	Included for compatibility only.
 *
 ***************************************************************************}
  DPLAD_SYSTEM	= DPLMSG_SYSTEM;


//{$IFDEF __cplusplus}
// };
//{$ENDIF}{ __cplusplus }

//{$ENDIF}{ __DPLOBBY_INCLUDED__ }

implementation

const
  dplayx = 'dplayx.dll';

  function DirectPlayLobbyCreateW; external dplayx name 'DirectPlayLobbyCreateW';
  function DirectPlayLobbyCreateA; external dplayx name 'DirectPlayLobbyCreateA';
  function DirectPlayLobbyCreate; external dplayx name 'DirectPlayLobbyCreateA';

end.
