DirectPlay8.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:143k
- //
- // COM definition for DirectPlay8 Thread Pool interface
- //
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlay8ThreadPool);'}
- {$EXTERNALSYM IDirectPlay8ThreadPool}
- IDirectPlay8ThreadPool = interface(IUnknown)
- ['{0d22ee73-4a46-4a0d-89b2-045b4d666425}']
- (*** IDirectPlay8ThreadPool methods ***)
- function Initialize(pvUserContext: Pointer; pfn: TFNDPNMessageHandler; dwFlags: DWORD): HResult; stdcall;
- function Close(dwFlags: DWORD): HResult; stdcall;
- function GetThreadCount(dwProcessorNum: DWORD; out pdwNumThreads: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetThreadCount(dwProcessorNum: DWORD; dwNumThreads: DWORD; dwFlags: DWORD): HResult; stdcall;
- function DoWork(dwAllowedTimeSlice: DWORD; dwFlags: DWORD): HResult; stdcall;
- end;
- //
- // COM definition for DirectPlay8 NAT Resolver interface
- //
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlay8NATResolver);'}
- {$EXTERNALSYM IDirectPlay8NATResolver}
- IDirectPlay8NATResolver = interface(IUnknown)
- ['{a9e213f2-9a60-486f-bf3b-53408b6d1cbb}']
- (*** IDirectPlay8NATResolver methods ***)
- function Initialize(pvUserContext: Pointer; pfn: TFNDPNMessageHandler; dwFlags: DWORD): HResult; stdcall;
- function Start(ppDevices: PIDirectPlay8Address; dwNumDevices: DWORD; dwFlags: DWORD): HResult; stdcall;
- function Close(dwFlags: DWORD): HResult; stdcall;
- function EnumDevices(pSPInfoBuffer: PDPNServiceProviderInfo; var pdwBufferSize: DWORD; out pdwNumDevices: DWORD; dwFlags: DWORD): HResult; stdcall;
- function GetAddresses(ppAddresses: PIDirectPlay8Address; out pdwNumAddresses: DWORD; dwFlags: DWORD): HResult; stdcall;
- end;
- (****************************************************************************
- *
- * DirectPlay8 Interface IIDs
- *
- ****************************************************************************)
- // {5102DACD-241B-11d3-AEA7-006097B01411}
- IID_IDirectPlay8Client = IDirectPlay8Client;
- {$EXTERNALSYM IID_IDirectPlay8Client}
- // {5102DACE-241B-11d3-AEA7-006097B01411}
- IID_IDirectPlay8Server = IDirectPlay8Server;
- {$EXTERNALSYM IID_IDirectPlay8Server}
- // {5102DACF-241B-11d3-AEA7-006097B01411}
- IID_IDirectPlay8Peer = IDirectPlay8Peer;
- {$EXTERNALSYM IID_IDirectPlay8Peer}
- // IIDs added for DirectX 9
- // {0D22EE73-4A46-4a0d-89B2-045B4D666425}
- IID_IDirectPlay8ThreadPool = IDirectPlay8ThreadPool;
- {$EXTERNALSYM IID_IDirectPlay8ThreadPool}
- // {A9E213F2-9A60-486f-BF3B-53408B6D1CBB}
- IID_IDirectPlay8NATResolver = IDirectPlay8NATResolver;
- {$EXTERNALSYM IID_IDirectPlay8NATResolver}
- (*==========================================================================
- *
- * Copyright (C) 2000 Microsoft Corporation. All Rights Reserved.
- *
- * File: DPLobby.h
- * Content: DirectPlay8 Lobby Include File
- *
- ***************************************************************************)
- (****************************************************************************
- *
- * DirectPlay8Lobby Structures (Non-Message)
- *
- ****************************************************************************)
- //
- // Information on a registered game
- //
- PDPLApplicationInfo = ^TDPLApplicationInfo;
- _DPL_APPLICATION_INFO = packed record
- guidApplication: TGUID; // GUID of the application
- pwszApplicationName: PWideChar; // Name of the application
- dwNumRunning: DWORD; // # of instances of this application running
- dwNumWaiting: DWORD; // # of instances of this application waiting
- dwFlags: DWORD; // Flags
- end;
- {$EXTERNALSYM _DPL_APPLICATION_INFO}
- DPL_APPLICATION_INFO = _DPL_APPLICATION_INFO;
- {$EXTERNALSYM DPL_APPLICATION_INFO}
- TDPLApplicationInfo = _DPL_APPLICATION_INFO;
- //
- // Settings to be used for connecting / hosting a game session
- //
- PDPLConnectionSettings = ^TDPLConnectionSettings;
- _DPL_CONNECTION_SETTINGS = packed record
- dwSize: DWORD; // Size of this structure
- dwFlags: DWORD; // Connection settings flags (DPLCONNECTSETTINGS_...)
- dpnAppDesc: TDPNApplicationDesc; // Application desc for the associated DirectPlay session
- pdp8HostAddress: IDirectPlay8Address; // Address of host to connect to
- ppdp8DeviceAddresses: IDirectPlay8Address; // Address of device to connect from / host on
- cNumDeviceAddresses: DWORD; // # of addresses specified in ppdp8DeviceAddresses
- pwszPlayerName: PWideChar; // Name to give the player
- end;
- {$EXTERNALSYM _DPL_CONNECTION_SETTINGS}
- DPL_CONNECTION_SETTINGS = _DPL_CONNECTION_SETTINGS;
- {$EXTERNALSYM DPL_CONNECTION_SETTINGS}
- TDPLConnectionSettings = _DPL_CONNECTION_SETTINGS;
- //
- // Information for performing a lobby connect
- // (ConnectApplication)
- //
- PDPLConnectInfo = ^TDPLConnectInfo;
- _DPL_CONNECT_INFO = packed record
- dwSize: DWORD; // Size of this structure
- dwFlags: DWORD; // Flags (DPLCONNECT_...)
- guidApplication: TGUID; // GUID of application to launch
- pdplConnectionSettings: PDPLConnectionSettings; // Settings application should use
- pvLobbyConnectData: Pointer; // User defined data block
- dwLobbyConnectDataSize: DWORD; // Size of user defined data block
- end;
- {$EXTERNALSYM _DPL_CONNECT_INFO}
- DPL_CONNECT_INFO = _DPL_CONNECT_INFO;
- {$EXTERNALSYM DPL_CONNECT_INFO}
- TDPLConnectInfo = _DPL_CONNECT_INFO;
- //
- // Information for registering an application
- // (RegisterApplication)
- //
- PDPLProgramDesc = ^TDPLProgramDesc;
- _DPL_PROGRAM_DESC = packed record
- dwSize: DWORD;
- dwFlags: DWORD;
- guidApplication: TGUID; // Application GUID
- pwszApplicationName: PWideChar; // Unicode application name
- pwszCommandLine: PWideChar; // Unicode command line arguments
- pwszCurrentDirectory: PWideChar; // Unicode current directory
- pwszDescription: PWideChar; // Unicode application description
- pwszExecutableFilename: PWideChar; // Unicode filename of application executable
- pwszExecutablePath: PWideChar; // Unicode path of application executable
- pwszLauncherFilename: PWideChar; // Unicode filename of launcher executable
- pwszLauncherPath: PWideChar; // Unicode path of launcher executable
- end;
- {$EXTERNALSYM _DPL_PROGRAM_DESC}
- DPL_PROGRAM_DESC = _DPL_PROGRAM_DESC;
- {$EXTERNALSYM DPL_PROGRAM_DESC}
- TDPLProgramDesc = _DPL_PROGRAM_DESC;
- (****************************************************************************
- *
- * DirectPlay8 Lobby Message Structures
- *
- ****************************************************************************)
- //
- // A connection was established
- // (DPL_MSGID_CONNECT)
- //
- PDPLMessageConnect = ^TDPLMessageConnect;
- _DPL_MESSAGE_CONNECT = packed record
- dwSize: DWORD; // Size of this structure
- hConnectId: TDPNHandle; // Handle of new connection
- pdplConnectionSettings: PDPLConnectionSettings; // Connection settings for this connection
- pvLobbyConnectData: Pointer; // User defined lobby data block
- dwLobbyConnectDataSize: DWORD; // Size of user defined lobby data block
- pvConnectionContext: Pointer; // Context value for this connection (user set)
- end;
- {$EXTERNALSYM _DPL_MESSAGE_CONNECT}
- DPL_MESSAGE_CONNECT = _DPL_MESSAGE_CONNECT;
- {$EXTERNALSYM DPL_MESSAGE_CONNECT}
- TDPLMessageConnect = _DPL_MESSAGE_CONNECT;
- //
- // Connection settings have been updated
- // (DPL_MSGID_CONNECTION_SETTINGS)
- //
- PDPLMessageConnectionSettings = ^TDPLMessageConnectionSettings;
- _DPL_MESSAGE_CONNECTION_SETTINGS = packed record
- dwSize: DWORD; // Size of this structure
- hSender: TDPNHandle; // Handle of the connection for these settings
- pdplConnectionSettings: PDPLConnectionSettings; // Connection settings
- pvConnectionContext: Pointer; // Context value for this connection
- end;
- {$EXTERNALSYM _DPL_MESSAGE_CONNECTION_SETTINGS}
- DPL_MESSAGE_CONNECTION_SETTINGS = _DPL_MESSAGE_CONNECTION_SETTINGS;
- {$EXTERNALSYM DPL_MESSAGE_CONNECTION_SETTINGS}
- TDPLMessageConnectionSettings = _DPL_MESSAGE_CONNECTION_SETTINGS;
- //
- // A connection has been disconnected
- // (DPL_MSGID_DISCONNECT)
- //
- PDPLMessageDisconnect = ^TDPLMessageDisconnect;
- _DPL_MESSAGE_DISCONNECT = packed record
- dwSize: DWORD; // Size of this structure
- hDisconnectId: TDPNHandle; // Handle of the connection that was terminated
- hrReason: HRESULT; // Reason the connection was broken
- pvConnectionContext: Pointer; // Context value for this connection
- end;
- {$EXTERNALSYM _DPL_MESSAGE_DISCONNECT}
- DPL_MESSAGE_DISCONNECT = _DPL_MESSAGE_DISCONNECT;
- {$EXTERNALSYM DPL_MESSAGE_DISCONNECT}
- TDPLMessageDisconnect = _DPL_MESSAGE_DISCONNECT;
- //
- // Data was received through a connection
- // (DPL_MSGID_RECEIVE)
- //
- PDPLMessageReceive = ^TDPLMessageReceive;
- _DPL_MESSAGE_RECEIVE = packed record
- dwSize: DWORD; // Size of this structure
- hSender: TDPNHandle; // Handle of the connection that is from
- pBuffer: PByte; // Contents of the message
- dwBufferSize: DWORD; // Size of the message context
- pvConnectionContext: Pointer; // Context value for this connection
- end;
- {$EXTERNALSYM _DPL_MESSAGE_RECEIVE}
- DPL_MESSAGE_RECEIVE = _DPL_MESSAGE_RECEIVE;
- {$EXTERNALSYM DPL_MESSAGE_RECEIVE}
- TDPLMessageReceive = _DPL_MESSAGE_RECEIVE;
- //
- // Current status of the associated connection
- // (DPL_MSGID_SESSION_STATUS)
- //
- PDPLMessageSessionStatus = ^TDPLMessageSessionStatus;
- _DPL_MESSAGE_SESSION_STATUS = packed record
- dwSize: DWORD; // Size of this structure
- hSender: TDPNHandle; // Handle of the connection that this is from
- dwStatus: DWORD; // Status (DPLSESSION_...)
- pvConnectionContext: Pointer; // Context value for this connection
- end;
- {$EXTERNALSYM _DPL_MESSAGE_SESSION_STATUS}
- DPL_MESSAGE_SESSION_STATUS = _DPL_MESSAGE_SESSION_STATUS;
- {$EXTERNALSYM DPL_MESSAGE_SESSION_STATUS}
- TDPLMessageSessionStatus = _DPL_MESSAGE_SESSION_STATUS;
- (****************************************************************************
- *
- * DirectPlay8Lobby Create
- *
- ****************************************************************************)
-
- (*
- * This function is no longer supported. It is recommended that CoCreateInstance be used to create
- * DirectPlay8 lobby objects.
- *
- * extern HRESULT WINAPI DirectPlay8LobbyCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown);
- *
- *)
- (****************************************************************************
- *
- * DirectPlay8 Functions
- *
- ****************************************************************************)
- //
- // COM definition for DirectPlayLobbyClient
- //
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlay8LobbyClient);'}
- {$EXTERNALSYM IDirectPlay8LobbyClient}
- IDirectPlay8LobbyClient = interface(IUnknown)
- ['{819074a2-016c-11d3-ae14-006097b01411}']
- // IDirectPlayLobbyClient methods
- function Initialize(pvUserContext: Pointer; pfn: TFNDPNMessageHandler; dwFlags: DWORD): HResult; stdcall;
- function EnumLocalPrograms(pGuidApplication: PGUID; pEnumData: PByte; var pdwEnumData: DWORD; out pdwItems: DWORD; dwFlags: DWORD): HResult; stdcall;
- function ConnectApplication(const pdplConnectionInfo: PDPLConnectInfo;
- pvConnectionContext: Pointer; hApplication: PDPNHandle; dwTimeOut, dwFlags: DWORD): HResult; stdcall;
- function Send(hConnection: TDPNHandle; pBuffer: PByte; pBufferSize, dwFlags: DWORD): HResult; stdcall;
- function ReleaseApplication(hConnection: TDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function Close(dwFlags: DWORD): HResult; stdcall;
- function GetConnectionSettings(hConnection: TDPNHandle; pdplSessionInfo: PDPLConnectionSettings; var pdwInfoSize: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetConnectionSettings(hConnection: TDPNHandle; const pdplSessionInfo: TDPLConnectionSettings; dwFlags: DWORD): HResult; stdcall;
- end;
- //
- // COM definition for DirectPlayLobbiedApplication
- //
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlay8LobbiedApplication);'}
- {$EXTERNALSYM IDirectPlay8LobbiedApplication}
- IDirectPlay8LobbiedApplication = interface(IUnknown)
- ['{819074a3-016c-11d3-ae14-006097b01411}']
- // IDirectPlayLobbiedApplication methods
- function Initialize(pvUserContext: Pointer; pfn: TFNDPNMessageHandler; pdpnhConnection: PDPNHandle; dwFlags: DWORD): HResult; stdcall;
- function RegisterProgram(const pdplProgramDesc: TDPLProgramDesc; dwFlags: DWORD): HResult; stdcall;
- function UnRegisterProgram(const pguidApplication: TGUID; dwFlags: DWORD): HResult; stdcall;
- function Send(hConnection: TDPNHandle; pBuffer: PByte; pBufferSize: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetAppAvailable(fAvailable: BOOL; dwFlags: DWORD): HResult; stdcall;
- function UpdateStatus(hConnection: TDPNHandle; dwStatus, dwFlags: DWORD): HResult; stdcall;
- function Close(dwFlags: DWORD): HResult; stdcall;
- function GetConnectionSettings(hConnection: TDPNHandle; pdplSessionInfo: PDPLConnectionSettings; var pdwInfoSize: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetConnectionSettings(hConnection: TDPNHandle; const pdplSessionInfo: TDPLConnectionSettings; dwFlags: DWORD): HResult; stdcall;
- end;
- const
- (****************************************************************************
- *
- * DirectPlay8Lobby CLSIDs
- *
- ****************************************************************************)
- // {667955AD-6B3B-43ca-B949-BC69B5BAFF7F}
- CLSID_DirectPlay8LobbiedApplication: TGUID = '{667955ad-6b3b-43ca-b949-bc69b5baff7f}';
- {$EXTERNALSYM CLSID_DirectPlay8LobbiedApplication}
- // {3B2B6775-70B6-45af-8DEA-A209C69559F3}
- CLSID_DirectPlay8LobbyClient: TGUID = '{3b2b6775-70b6-45af-8dea-a209c69559f3}';
- {$EXTERNALSYM CLSID_DirectPlay8LobbyClient}
- (****************************************************************************
- *
- * DirectPlay8Lobby Interface IIDs
- *
- ****************************************************************************)
- // {819074A3-016C-11d3-AE14-006097B01411}
- IID_IDirectPlay8LobbiedApplication = IDirectPlay8LobbiedApplication;
- {$EXTERNALSYM IID_IDirectPlay8LobbiedApplication}
- // {819074A2-016C-11d3-AE14-006097B01411}
- IID_IDirectPlay8LobbyClient = IDirectPlay8LobbyClient;
- {$EXTERNALSYM IID_IDirectPlay8LobbyClient}
- (****************************************************************************
- *
- * DirectPlay8 Lobby Message IDs
- *
- ****************************************************************************)
- DPL_MSGID_LOBBY = $8000;
- {$EXTERNALSYM DPL_MSGID_LOBBY}
- DPL_MSGID_RECEIVE = ($0001 or DPL_MSGID_LOBBY);
- {$EXTERNALSYM DPL_MSGID_RECEIVE}
- DPL_MSGID_CONNECT = ($0002 or DPL_MSGID_LOBBY);
- {$EXTERNALSYM DPL_MSGID_CONNECT}
- DPL_MSGID_DISCONNECT = ($0003 or DPL_MSGID_LOBBY);
- {$EXTERNALSYM DPL_MSGID_DISCONNECT}
- DPL_MSGID_SESSION_STATUS = ($0004 or DPL_MSGID_LOBBY);
- {$EXTERNALSYM DPL_MSGID_SESSION_STATUS}
- DPL_MSGID_CONNECTION_SETTINGS = ($0005 or DPL_MSGID_LOBBY);
- {$EXTERNALSYM DPL_MSGID_CONNECTION_SETTINGS}
- (****************************************************************************
- *
- * DirectPlay8Lobby Constants
- *
- ****************************************************************************)
- //
- // Specifies that operation should be performed on all open connections
- //
- DPLHANDLE_ALLCONNECTIONS = $FFFFFFFF;
- {$EXTERNALSYM DPLHANDLE_ALLCONNECTIONS}
- //
- // The associated game session has suceeded in connecting / hosting
- //
- DPLSESSION_CONNECTED = $0001;
- {$EXTERNALSYM DPLSESSION_CONNECTED}
- // The associated game session failed connecting / hosting
- //
- DPLSESSION_COULDNOTCONNECT = $0002;
- {$EXTERNALSYM DPLSESSION_COULDNOTCONNECT}
- //
- // The associated game session has disconnected
- //
- DPLSESSION_DISCONNECTED = $0003;
- {$EXTERNALSYM DPLSESSION_DISCONNECTED}
- //
- // The associated game session has terminated
- //
- DPLSESSION_TERMINATED = $0004;
- {$EXTERNALSYM DPLSESSION_TERMINATED}
- //
- // The associated game session's host has migrated
- //
- DPLSESSION_HOSTMIGRATED = $0005;
- {$EXTERNALSYM DPLSESSION_HOSTMIGRATED}
- //
- // The associated game session's host has migrated to the local client
- //
- DPLSESSION_HOSTMIGRATEDHERE = $0006;
- {$EXTERNALSYM DPLSESSION_HOSTMIGRATEDHERE}
- (****************************************************************************
- *
- * DirectPlay8 Lobby Flags
- *
- ****************************************************************************)
- //
- // Do not automatically make the lobby app unavailable when a connection is established
- //
- DPLAVAILABLE_ALLOWMULTIPLECONNECT = $0001;
- {$EXTERNALSYM DPLAVAILABLE_ALLOWMULTIPLECONNECT}
- //
- // Launch a new instance of the application to connect to
- //
- DPLCONNECT_LAUNCHNEW = $0001;
- {$EXTERNALSYM DPLCONNECT_LAUNCHNEW}
- //
- // Launch a new instance of the application if one is not waiting
- //
- DPLCONNECT_LAUNCHNOTFOUND = $0002;
- {$EXTERNALSYM DPLCONNECT_LAUNCHNOTFOUND}
- //
- // When starting the associated game session, start it as a host
- //
- DPLCONNECTSETTINGS_HOST = $0001;
- {$EXTERNALSYM DPLCONNECTSETTINGS_HOST}
- //
- // Disable parameter validation
- //
- DPLINITIALIZE_DISABLEPARAMVAL = $0001;
- {$EXTERNALSYM DPLINITIALIZE_DISABLEPARAMVAL}
- ///// Part 2 of dplay8.h /////
- (*==========================================================================;
- *
- * Copyright (C) 1998-2000 Microsoft Corporation. All Rights Reserved.
- *
- * File: DPlay8.h
- * Content: DirectPlay8 include file
- *
- ***************************************************************************)
- (****************************************************************************
- *
- * DIRECTPLAY8 ERRORS
- *
- * Errors are represented by negative values and cannot be combined.
- *
- ****************************************************************************)
- const
- _DPN_FACILITY_CODE = $015;
- {$EXTERNALSYM _DPN_FACILITY_CODE}
- _DPNHRESULT_BASE = $8000;
- {$EXTERNALSYM _DPNHRESULT_BASE}
- MAKE_DPNHRESULT_R = (1 shl 31) or (_DPN_FACILITY_CODE shl 16) + _DPNHRESULT_BASE;
- // #define MAKE_DPNHRESULT( code ) MAKE_HRESULT( 1, _DPN_FACILITY_CODE, ( code + _DPNHRESULT_BASE ) )
- function MAKE_DPNHRESULT(Code: DWORD): DWORD;
- {$EXTERNALSYM MAKE_DPNHRESULT}
- const
- DPN_OK = S_OK;
- {$EXTERNALSYM DPN_OK}
- DPNSUCCESS_EQUAL = HRESULT((0 shl 31) or (_DPN_FACILITY_CODE shl 16) or ($5 + _DPNHRESULT_BASE)); // MAKE_HRESULT( 0, _DPN_FACILITY_CODE, ( 0x5 + _DPNHRESULT_BASE ) )
- {$EXTERNALSYM DPNSUCCESS_EQUAL}
- DPNSUCCESS_NOPLAYERSINGROUP = HRESULT((0 shl 31) or (_DPN_FACILITY_CODE shl 16) or ($8 + _DPNHRESULT_BASE)); // MAKE_HRESULT( 0, _DPN_FACILITY_CODE, ( 0x8 + _DPNHRESULT_BASE ) ) // added for DirectX 9
- {$EXTERNALSYM DPNSUCCESS_NOPLAYERSINGROUP}
- DPNSUCCESS_NOTEQUAL = HRESULT((0 shl 31) or (_DPN_FACILITY_CODE shl 16) or ($A + _DPNHRESULT_BASE)); // MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0A + _DPNHRESULT_BASE ) )
- {$EXTERNALSYM DPNSUCCESS_NOTEQUAL}
- DPNSUCCESS_PENDING = HRESULT((0 shl 31) or (_DPN_FACILITY_CODE shl 16) or ($e + _DPNHRESULT_BASE)); // MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0e + _DPNHRESULT_BASE ) )
- {$EXTERNALSYM DPNSUCCESS_PENDING}
- DPNERR_ABORTED = HRESULT(MAKE_DPNHRESULT_R + $30); // MAKE_DPNHRESULT( 0x30 )
- {$EXTERNALSYM DPNERR_ABORTED}
- DPNERR_ADDRESSING = HRESULT(MAKE_DPNHRESULT_R + $40); // MAKE_DPNHRESULT( 0x40 )
- {$EXTERNALSYM DPNERR_ADDRESSING}
- DPNERR_ALREADYCLOSING = HRESULT(MAKE_DPNHRESULT_R + $50); // MAKE_DPNHRESULT( 0x50 )
- {$EXTERNALSYM DPNERR_ALREADYCLOSING}
- DPNERR_ALREADYCONNECTED = HRESULT(MAKE_DPNHRESULT_R + $60); // MAKE_DPNHRESULT( 0x60 )
- {$EXTERNALSYM DPNERR_ALREADYCONNECTED}
- DPNERR_ALREADYDISCONNECTING = HRESULT(MAKE_DPNHRESULT_R + $70); // MAKE_DPNHRESULT( 0x70 )
- {$EXTERNALSYM DPNERR_ALREADYDISCONNECTING}
- DPNERR_ALREADYINITIALIZED = HRESULT(MAKE_DPNHRESULT_R + $80); // MAKE_DPNHRESULT( 0x80 )
- {$EXTERNALSYM DPNERR_ALREADYINITIALIZED}
- DPNERR_ALREADYREGISTERED = HRESULT(MAKE_DPNHRESULT_R + $90); // MAKE_DPNHRESULT( 0x90 )
- {$EXTERNALSYM DPNERR_ALREADYREGISTERED}
- DPNERR_BUFFERTOOSMALL = HRESULT(MAKE_DPNHRESULT_R + $100); // MAKE_DPNHRESULT( 0x100 )
- {$EXTERNALSYM DPNERR_BUFFERTOOSMALL}
- DPNERR_CANNOTCANCEL = HRESULT(MAKE_DPNHRESULT_R + $110); // MAKE_DPNHRESULT( 0x110 )
- {$EXTERNALSYM DPNERR_CANNOTCANCEL}
- DPNERR_CANTCREATEGROUP = HRESULT(MAKE_DPNHRESULT_R + $120); // MAKE_DPNHRESULT( 0x120 )
- {$EXTERNALSYM DPNERR_CANTCREATEGROUP}
- DPNERR_CANTCREATEPLAYER = HRESULT(MAKE_DPNHRESULT_R + $130); // MAKE_DPNHRESULT( 0x130 )
- {$EXTERNALSYM DPNERR_CANTCREATEPLAYER}
- DPNERR_CANTLAUNCHAPPLICATION = HRESULT(MAKE_DPNHRESULT_R + $140); // MAKE_DPNHRESULT( 0x140 )
- {$EXTERNALSYM DPNERR_CANTLAUNCHAPPLICATION}
- DPNERR_CONNECTING = HRESULT(MAKE_DPNHRESULT_R + $150); // MAKE_DPNHRESULT( 0x150 )
- {$EXTERNALSYM DPNERR_CONNECTING}
- DPNERR_CONNECTIONLOST = HRESULT(MAKE_DPNHRESULT_R + $160); // MAKE_DPNHRESULT( 0x160 )
- {$EXTERNALSYM DPNERR_CONNECTIONLOST}
- DPNERR_CONVERSION = HRESULT(MAKE_DPNHRESULT_R + $170); // MAKE_DPNHRESULT( 0x170 )
- {$EXTERNALSYM DPNERR_CONVERSION}
- DPNERR_DATATOOLARGE = HRESULT(MAKE_DPNHRESULT_R + $175); // MAKE_DPNHRESULT( 0x175 )
- {$EXTERNALSYM DPNERR_DATATOOLARGE}
- DPNERR_DOESNOTEXIST = HRESULT(MAKE_DPNHRESULT_R + $180); // MAKE_DPNHRESULT( 0x180 )
- {$EXTERNALSYM DPNERR_DOESNOTEXIST}
- DPNERR_DPNSVRNOTAVAILABLE = HRESULT(MAKE_DPNHRESULT_R + $185); // MAKE_DPNHRESULT( 0x185 )
- {$EXTERNALSYM DPNERR_DPNSVRNOTAVAILABLE}
- DPNERR_DUPLICATECOMMAND = HRESULT(MAKE_DPNHRESULT_R + $190); // MAKE_DPNHRESULT( 0x190 )
- {$EXTERNALSYM DPNERR_DUPLICATECOMMAND}
- DPNERR_ENDPOINTNOTRECEIVING = HRESULT(MAKE_DPNHRESULT_R + $200); // MAKE_DPNHRESULT( 0x200 )
- {$EXTERNALSYM DPNERR_ENDPOINTNOTRECEIVING}
- DPNERR_ENUMQUERYTOOLARGE = HRESULT(MAKE_DPNHRESULT_R + $210); // MAKE_DPNHRESULT( 0x210 )
- {$EXTERNALSYM DPNERR_ENUMQUERYTOOLARGE}
- DPNERR_ENUMRESPONSETOOLARGE = HRESULT(MAKE_DPNHRESULT_R + $220); // MAKE_DPNHRESULT( 0x220 )
- {$EXTERNALSYM DPNERR_ENUMRESPONSETOOLARGE}
- DPNERR_EXCEPTION = HRESULT(MAKE_DPNHRESULT_R + $230); // MAKE_DPNHRESULT( 0x230 )
- {$EXTERNALSYM DPNERR_EXCEPTION}
- DPNERR_GENERIC = E_FAIL;
- {$EXTERNALSYM DPNERR_GENERIC}
- DPNERR_GROUPNOTEMPTY = HRESULT(MAKE_DPNHRESULT_R + $240); // MAKE_DPNHRESULT( 0x240 )
- {$EXTERNALSYM DPNERR_GROUPNOTEMPTY}
- DPNERR_HOSTING = HRESULT(MAKE_DPNHRESULT_R + $250); // MAKE_DPNHRESULT( 0x250 )
- {$EXTERNALSYM DPNERR_HOSTING}
- DPNERR_HOSTREJECTEDCONNECTION = HRESULT(MAKE_DPNHRESULT_R + $260); // MAKE_DPNHRESULT( 0x260 )
- {$EXTERNALSYM DPNERR_HOSTREJECTEDCONNECTION}
- DPNERR_HOSTTERMINATEDSESSION = HRESULT(MAKE_DPNHRESULT_R + $270); // MAKE_DPNHRESULT( 0x270 )
- {$EXTERNALSYM DPNERR_HOSTTERMINATEDSESSION}
- DPNERR_INCOMPLETEADDRESS = HRESULT(MAKE_DPNHRESULT_R + $280); // MAKE_DPNHRESULT( 0x280 )
- {$EXTERNALSYM DPNERR_INCOMPLETEADDRESS}
- DPNERR_INVALIDADDRESSFORMAT = HRESULT(MAKE_DPNHRESULT_R + $290); // MAKE_DPNHRESULT( 0x290 )
- {$EXTERNALSYM DPNERR_INVALIDADDRESSFORMAT}
- DPNERR_INVALIDAPPLICATION = HRESULT(MAKE_DPNHRESULT_R + $300); // MAKE_DPNHRESULT( 0x300 )
- {$EXTERNALSYM DPNERR_INVALIDAPPLICATION}
- DPNERR_INVALIDCOMMAND = HRESULT(MAKE_DPNHRESULT_R + $310); // MAKE_DPNHRESULT( 0x310 )
- {$EXTERNALSYM DPNERR_INVALIDCOMMAND}
- DPNERR_INVALIDDEVICEADDRESS = HRESULT(MAKE_DPNHRESULT_R + $320); // MAKE_DPNHRESULT( 0x320 )
- {$EXTERNALSYM DPNERR_INVALIDDEVICEADDRESS}
- DPNERR_INVALIDENDPOINT = HRESULT(MAKE_DPNHRESULT_R + $330); // MAKE_DPNHRESULT( 0x330 )
- {$EXTERNALSYM DPNERR_INVALIDENDPOINT}
- DPNERR_INVALIDFLAGS = HRESULT(MAKE_DPNHRESULT_R + $340); // MAKE_DPNHRESULT( 0x340 )
- {$EXTERNALSYM DPNERR_INVALIDFLAGS}
- DPNERR_INVALIDGROUP = HRESULT(MAKE_DPNHRESULT_R + $350); // MAKE_DPNHRESULT( 0x350 )
- {$EXTERNALSYM DPNERR_INVALIDGROUP}
- DPNERR_INVALIDHANDLE = HRESULT(MAKE_DPNHRESULT_R + $360); // MAKE_DPNHRESULT( 0x360 )
- {$EXTERNALSYM DPNERR_INVALIDHANDLE}
- DPNERR_INVALIDHOSTADDRESS = HRESULT(MAKE_DPNHRESULT_R + $370); // MAKE_DPNHRESULT( 0x370 )
- {$EXTERNALSYM DPNERR_INVALIDHOSTADDRESS}
- DPNERR_INVALIDINSTANCE = HRESULT(MAKE_DPNHRESULT_R + $380); // MAKE_DPNHRESULT( 0x380 )
- {$EXTERNALSYM DPNERR_INVALIDINSTANCE}
- DPNERR_INVALIDINTERFACE = HRESULT(MAKE_DPNHRESULT_R + $390); // MAKE_DPNHRESULT( 0x390 )
- {$EXTERNALSYM DPNERR_INVALIDINTERFACE}
- DPNERR_INVALIDOBJECT = HRESULT(MAKE_DPNHRESULT_R + $400); // MAKE_DPNHRESULT( 0x400 )
- {$EXTERNALSYM DPNERR_INVALIDOBJECT}
- DPNERR_INVALIDPARAM = E_INVALIDARG;
- {$EXTERNALSYM DPNERR_INVALIDPARAM}
- DPNERR_INVALIDPASSWORD = HRESULT(MAKE_DPNHRESULT_R + $410); // MAKE_DPNHRESULT( 0x410 )
- {$EXTERNALSYM DPNERR_INVALIDPASSWORD}
- DPNERR_INVALIDPLAYER = HRESULT(MAKE_DPNHRESULT_R + $420); // MAKE_DPNHRESULT( 0x420 )
- {$EXTERNALSYM DPNERR_INVALIDPLAYER}
- DPNERR_INVALIDPOINTER = E_POINTER;
- {$EXTERNALSYM DPNERR_INVALIDPOINTER}
- DPNERR_INVALIDPRIORITY = HRESULT(MAKE_DPNHRESULT_R + $430); // MAKE_DPNHRESULT( 0x430 )
- {$EXTERNALSYM DPNERR_INVALIDPRIORITY}
- DPNERR_INVALIDSTRING = HRESULT(MAKE_DPNHRESULT_R + $440); // MAKE_DPNHRESULT( 0x440 )
- {$EXTERNALSYM DPNERR_INVALIDSTRING}
- DPNERR_INVALIDURL = HRESULT(MAKE_DPNHRESULT_R + $450); // MAKE_DPNHRESULT( 0x450 )
- {$EXTERNALSYM DPNERR_INVALIDURL}
- DPNERR_INVALIDVERSION = HRESULT(MAKE_DPNHRESULT_R + $460); // MAKE_DPNHRESULT( 0x460 )
- {$EXTERNALSYM DPNERR_INVALIDVERSION}
- DPNERR_NOCAPS = HRESULT(MAKE_DPNHRESULT_R + $470); // MAKE_DPNHRESULT( 0x470 )
- {$EXTERNALSYM DPNERR_NOCAPS}
- DPNERR_NOCONNECTION = HRESULT(MAKE_DPNHRESULT_R + $480); // MAKE_DPNHRESULT( 0x480 )
- {$EXTERNALSYM DPNERR_NOCONNECTION}
- DPNERR_NOHOSTPLAYER = HRESULT(MAKE_DPNHRESULT_R + $490); // MAKE_DPNHRESULT( 0x490 )
- {$EXTERNALSYM DPNERR_NOHOSTPLAYER}
- DPNERR_NOINTERFACE = E_NOINTERFACE;
- {$EXTERNALSYM DPNERR_NOINTERFACE}
- DPNERR_NOMOREADDRESSCOMPONENTS = HRESULT(MAKE_DPNHRESULT_R + $500); // MAKE_DPNHRESULT( 0x500 )
- {$EXTERNALSYM DPNERR_NOMOREADDRESSCOMPONENTS}
- DPNERR_NORESPONSE = HRESULT(MAKE_DPNHRESULT_R + $510); // MAKE_DPNHRESULT( 0x510 )
- {$EXTERNALSYM DPNERR_NORESPONSE}
- DPNERR_NOTALLOWED = HRESULT(MAKE_DPNHRESULT_R + $520); // MAKE_DPNHRESULT( 0x520 )
- {$EXTERNALSYM DPNERR_NOTALLOWED}
- DPNERR_NOTHOST = HRESULT(MAKE_DPNHRESULT_R + $530); // MAKE_DPNHRESULT( 0x530 )
- {$EXTERNALSYM DPNERR_NOTHOST}
- DPNERR_NOTREADY = HRESULT(MAKE_DPNHRESULT_R + $540); // MAKE_DPNHRESULT( 0x540 )
- {$EXTERNALSYM DPNERR_NOTREADY}
- DPNERR_NOTREGISTERED = HRESULT(MAKE_DPNHRESULT_R + $550); // MAKE_DPNHRESULT( 0x550 )
- {$EXTERNALSYM DPNERR_NOTREGISTERED}
- DPNERR_OUTOFMEMORY = E_OUTOFMEMORY;
- {$EXTERNALSYM DPNERR_OUTOFMEMORY}
- DPNERR_PENDING = DPNSUCCESS_PENDING;
- {$EXTERNALSYM DPNERR_PENDING}
- DPNERR_PLAYERALREADYINGROUP = HRESULT(MAKE_DPNHRESULT_R + $560); // MAKE_DPNHRESULT( 0x560 )
- {$EXTERNALSYM DPNERR_PLAYERALREADYINGROUP}
- DPNERR_PLAYERLOST = HRESULT(MAKE_DPNHRESULT_R + $570); // MAKE_DPNHRESULT( 0x570 )
- {$EXTERNALSYM DPNERR_PLAYERLOST}
- DPNERR_PLAYERNOTINGROUP = HRESULT(MAKE_DPNHRESULT_R + $580); // MAKE_DPNHRESULT( 0x580 )
- {$EXTERNALSYM DPNERR_PLAYERNOTINGROUP}
- DPNERR_PLAYERNOTREACHABLE = HRESULT(MAKE_DPNHRESULT_R + $590); // MAKE_DPNHRESULT( 0x590 )
- {$EXTERNALSYM DPNERR_PLAYERNOTREACHABLE}
- DPNERR_SENDTOOLARGE = HRESULT(MAKE_DPNHRESULT_R + $600); // MAKE_DPNHRESULT( 0x600 )
- {$EXTERNALSYM DPNERR_SENDTOOLARGE}
- DPNERR_SESSIONFULL = HRESULT(MAKE_DPNHRESULT_R + $610); // MAKE_DPNHRESULT( 0x610 )
- {$EXTERNALSYM DPNERR_SESSIONFULL}
- DPNERR_TABLEFULL = HRESULT(MAKE_DPNHRESULT_R + $620); // MAKE_DPNHRESULT( 0x620 )
- {$EXTERNALSYM DPNERR_TABLEFULL}
- DPNERR_TIMEDOUT = HRESULT(MAKE_DPNHRESULT_R + $630); // MAKE_DPNHRESULT( 0x630 )
- {$EXTERNALSYM DPNERR_TIMEDOUT}
- DPNERR_UNINITIALIZED = HRESULT(MAKE_DPNHRESULT_R + $640); // MAKE_DPNHRESULT( 0x640 )
- {$EXTERNALSYM DPNERR_UNINITIALIZED}
- DPNERR_UNSUPPORTED = E_NOTIMPL;
- {$EXTERNALSYM DPNERR_UNSUPPORTED}
- DPNERR_USERCANCEL = HRESULT(MAKE_DPNHRESULT_R + $650); // MAKE_DPNHRESULT( 0x650 )
- {$EXTERNALSYM DPNERR_USERCANCEL}
- (*==========================================================================;
- *
- * Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
- *
- * File: dpvoice.h
- * Content: DirectPlayVoice include file
- ***************************************************************************)
- const
- (****************************************************************************
- *
- * DirectPlayVoice CLSIDs
- *
- ****************************************************************************)
- // {B9F3EB85-B781-4ac1-8D90-93A05EE37D7D}
- CLSID_DirectPlayVoiceClient: TGUID = '{b9f3eb85-b781-4ac1-8d90-93a05ee37d7d}';
- {$EXTERNALSYM CLSID_DirectPlayVoiceClient}
- // {D3F5B8E6-9B78-4a4c-94EA-CA2397B663D3}
- CLSID_DirectPlayVoiceServer: TGUID = '{d3f5b8e6-9b78-4a4c-94ea-ca2397b663d3}';
- {$EXTERNALSYM CLSID_DirectPlayVoiceServer}
- // {0F0F094B-B01C-4091-A14D-DD0CD807711A}
- CLSID_DirectPlayVoiceTest: TGUID = '{0f0f094b-b01c-4091-a14d-dd0cd807711a}';
- {$EXTERNALSYM CLSID_DirectPlayVoiceTest}
- (****************************************************************************
- *
- * DirectPlayVoice Compression Type GUIDs
- *
- ****************************************************************************)
- // MS-ADPCM 32.8 kbit/s
- //
- // {699B52C1-A885-46a8-A308-97172419ADC7}
- DPVCTGUID_ADPCM: TGUID = '{699b52c1-a885-46a8-a308-97172419adc7}';
- {$EXTERNALSYM DPVCTGUID_ADPCM}
- // Microsoft GSM 6.10 13 kbit/s
- //
- // {24768C60-5A0D-11d3-9BE4-525400D985E7}
- DPVCTGUID_GSM: TGUID = '{24768c60-5a0d-11d3-9be4-525400d985e7}';
- {$EXTERNALSYM DPVCTGUID_GSM}
- // MS-PCM 64 kbit/s
- //
- // {8DE12FD4-7CB3-48ce-A7E8-9C47A22E8AC5}
- DPVCTGUID_NONE: TGUID = '{8de12fd4-7cb3-48ce-a7e8-9c47a22e8ac5}';
- {$EXTERNALSYM DPVCTGUID_NONE}
- // Voxware SC03 3.2kbit/s
- //
- // {7D82A29B-2242-4f82-8F39-5D1153DF3E41}
- DPVCTGUID_SC03: TGUID = '{7d82a29b-2242-4f82-8f39-5d1153df3e41}';
- {$EXTERNALSYM DPVCTGUID_SC03}
- // Voxware SC06 6.4kbit/s
- //
- // {53DEF900-7168-4633-B47F-D143916A13C7}
- DPVCTGUID_SC06: TGUID = '{53def900-7168-4633-b47f-d143916a13c7}';
- {$EXTERNALSYM DPVCTGUID_SC06}
- // TrueSpeech(TM) 8.6 kbit/s
- //
- // {D7954361-5A0B-11d3-9BE4-525400D985E7}
- DPVCTGUID_TRUESPEECH: TGUID = '{d7954361-5a0b-11d3-9be4-525400d985e7}';
- {$EXTERNALSYM DPVCTGUID_TRUESPEECH}
- // Voxware VR12 1.4kbit/s
- //
- // {FE44A9FE-8ED4-48bf-9D66-1B1ADFF9FF6D}
- DPVCTGUID_VR12: TGUID = '{fe44a9fe-8ed4-48bf-9d66-1b1adff9ff6d}';
- {$EXTERNALSYM DPVCTGUID_VR12}
- // Define the default compression type
- DPVCTGUID_DEFAULT: TGUID = '{7d82a29b-2242-4f82-8f39-5d1153df3e41}'; // DPVCTGUID_SC03;
- {$EXTERNALSYM DPVCTGUID_DEFAULT}
- (****************************************************************************
- *
- * DirectPlayVoice Callback Functions
- *
- ****************************************************************************)
- type
- TDVMessageHandler = function(pvUserContext: Pointer; dwMessageType: DWORD; lpMessage: Pointer): HResult; stdcall;
- {$NODEFINE TDVMessageHandler}
- {$HPPEMIT 'typedef PDVMESSAGEHANDLER TDVMessageHandler;'}
- (****************************************************************************
- *
- * DirectPlayVoice Datatypes (Non-Structure / Non-Message)
- *
- ****************************************************************************)
- PDVID = ^DVID;
- DVID = DWORD;
- {$EXTERNALSYM DVID}
- TDVID = DVID;
- (****************************************************************************
- *
- * DirectPlayVoice Message Types
- *
- ****************************************************************************)
- const
- DVMSGID_BASE = $0000;
- {$EXTERNALSYM DVMSGID_BASE}
- DVMSGID_CREATEVOICEPLAYER = (DVMSGID_BASE+$0001);
- {$EXTERNALSYM DVMSGID_CREATEVOICEPLAYER}
- DVMSGID_DELETEVOICEPLAYER = (DVMSGID_BASE+$0002);
- {$EXTERNALSYM DVMSGID_DELETEVOICEPLAYER}
- DVMSGID_SESSIONLOST = (DVMSGID_BASE+$0003);
- {$EXTERNALSYM DVMSGID_SESSIONLOST}
- DVMSGID_PLAYERVOICESTART = (DVMSGID_BASE+$0004);
- {$EXTERNALSYM DVMSGID_PLAYERVOICESTART}
- DVMSGID_PLAYERVOICESTOP = (DVMSGID_BASE+$0005);
- {$EXTERNALSYM DVMSGID_PLAYERVOICESTOP}
- DVMSGID_RECORDSTART = (DVMSGID_BASE+$0006);
- {$EXTERNALSYM DVMSGID_RECORDSTART}
- DVMSGID_RECORDSTOP = (DVMSGID_BASE+$0007);
- {$EXTERNALSYM DVMSGID_RECORDSTOP}
- DVMSGID_CONNECTRESULT = (DVMSGID_BASE+$0008);
- {$EXTERNALSYM DVMSGID_CONNECTRESULT}
- DVMSGID_DISCONNECTRESULT = (DVMSGID_BASE+$0009);
- {$EXTERNALSYM DVMSGID_DISCONNECTRESULT}
- DVMSGID_INPUTLEVEL = (DVMSGID_BASE+$000A);
- {$EXTERNALSYM DVMSGID_INPUTLEVEL}
- DVMSGID_OUTPUTLEVEL = (DVMSGID_BASE+$000B);
- {$EXTERNALSYM DVMSGID_OUTPUTLEVEL}
- DVMSGID_HOSTMIGRATED = (DVMSGID_BASE+$000C);
- {$EXTERNALSYM DVMSGID_HOSTMIGRATED}
- DVMSGID_SETTARGETS = (DVMSGID_BASE+$000D);
- {$EXTERNALSYM DVMSGID_SETTARGETS}
- DVMSGID_PLAYEROUTPUTLEVEL = (DVMSGID_BASE+$000E);
- {$EXTERNALSYM DVMSGID_PLAYEROUTPUTLEVEL}
- DVMSGID_LOSTFOCUS = (DVMSGID_BASE+$0010);
- {$EXTERNALSYM DVMSGID_LOSTFOCUS}
- DVMSGID_GAINFOCUS = (DVMSGID_BASE+$0011);
- {$EXTERNALSYM DVMSGID_GAINFOCUS}
- DVMSGID_LOCALHOSTSETUP = (DVMSGID_BASE+$0012);
- {$EXTERNALSYM DVMSGID_LOCALHOSTSETUP}
- DVMSGID_MAXBASE = (DVMSGID_LOCALHOSTSETUP);
- {$EXTERNALSYM DVMSGID_MAXBASE}
- DVMSGID_MINBASE = (DVMSGID_CREATEVOICEPLAYER);
- {$EXTERNALSYM DVMSGID_MINBASE}
- (****************************************************************************
- *
- * DirectPlayVoice Constants
- *
- ****************************************************************************)
- //
- // Buffer Aggresiveness Value Ranges
- //
- DVBUFFERAGGRESSIVENESS_MIN = $00000001;
- {$EXTERNALSYM DVBUFFERAGGRESSIVENESS_MIN}
- DVBUFFERAGGRESSIVENESS_MAX = $00000064;
- {$EXTERNALSYM DVBUFFERAGGRESSIVENESS_MAX}
- DVBUFFERAGGRESSIVENESS_DEFAULT = $00000000;
- {$EXTERNALSYM DVBUFFERAGGRESSIVENESS_DEFAULT}
- //
- // Buffer Quality Value Ranges
- //
- DVBUFFERQUALITY_MIN = $00000001;
- {$EXTERNALSYM DVBUFFERQUALITY_MIN}
- DVBUFFERQUALITY_MAX = $00000064;
- {$EXTERNALSYM DVBUFFERQUALITY_MAX}
- DVBUFFERQUALITY_DEFAULT = $00000000;
- {$EXTERNALSYM DVBUFFERQUALITY_DEFAULT}
- DVID_SYS = 0;
- {$EXTERNALSYM DVID_SYS}
- //
- // Used to identify the session host in client/server
- //
- DVID_SERVERPLAYER = 1;
- {$EXTERNALSYM DVID_SERVERPLAYER}
- //
- // Used to target all players
- //
- DVID_ALLPLAYERS = 0;
- {$EXTERNALSYM DVID_ALLPLAYERS}
- //
- // Used to identify the main buffer
- //
- DVID_REMAINING = $FFFFFFFF;
- {$EXTERNALSYM DVID_REMAINING}
- //
- // Input level range
- //
- DVINPUTLEVEL_MIN = $00000000;
- {$EXTERNALSYM DVINPUTLEVEL_MIN}
- DVINPUTLEVEL_MAX = $00000063; // 99 decimal
- {$EXTERNALSYM DVINPUTLEVEL_MAX}
- DVNOTIFYPERIOD_MINPERIOD = 20;
- {$EXTERNALSYM DVNOTIFYPERIOD_MINPERIOD}
- DVPLAYBACKVOLUME_DEFAULT = DSBVOLUME_MAX;
- {$EXTERNALSYM DVPLAYBACKVOLUME_DEFAULT}
- DVRECORDVOLUME_LAST = $00000001;
- {$EXTERNALSYM DVRECORDVOLUME_LAST}
- //
- // Use the default value
- //
- DVTHRESHOLD_DEFAULT = $FFFFFFFF;
- {$EXTERNALSYM DVTHRESHOLD_DEFAULT}
- //
- // Threshold Ranges
- //
- DVTHRESHOLD_MIN = $00000000;
- {$EXTERNALSYM DVTHRESHOLD_MIN}
- DVTHRESHOLD_MAX = $00000063; // 99 decimal
- {$EXTERNALSYM DVTHRESHOLD_MAX}
- //
- // Threshold field is not used
- //
- DVTHRESHOLD_UNUSED = $FFFFFFFE;
- {$EXTERNALSYM DVTHRESHOLD_UNUSED}
- //
- // Session Types
- //
- DVSESSIONTYPE_PEER = $00000001;
- {$EXTERNALSYM DVSESSIONTYPE_PEER}
- DVSESSIONTYPE_MIXING = $00000002;
- {$EXTERNALSYM DVSESSIONTYPE_MIXING}
- DVSESSIONTYPE_FORWARDING = $00000003;
- {$EXTERNALSYM DVSESSIONTYPE_FORWARDING}
- DVSESSIONTYPE_ECHO = $00000004;
- {$EXTERNALSYM DVSESSIONTYPE_ECHO}
- (****************************************************************************
- *
- * DirectPlayVoice Flags
- *
- ****************************************************************************)
- //
- // Enable automatic adjustment of the recording volume
- //
- DVCLIENTCONFIG_AUTORECORDVOLUME = $00000008;
- {$EXTERNALSYM DVCLIENTCONFIG_AUTORECORDVOLUME}
- //
- // Enable automatic voice activation
- //
- DVCLIENTCONFIG_AUTOVOICEACTIVATED = $00000020;
- {$EXTERNALSYM DVCLIENTCONFIG_AUTOVOICEACTIVATED}
- //
- // Enable echo suppression
- //
- DVCLIENTCONFIG_ECHOSUPPRESSION = $08000000;
- {$EXTERNALSYM DVCLIENTCONFIG_ECHOSUPPRESSION}
- //
- // Voice Activation manual mode
- //
- DVCLIENTCONFIG_MANUALVOICEACTIVATED = $00000004;
- {$EXTERNALSYM DVCLIENTCONFIG_MANUALVOICEACTIVATED}
- //
- // Only playback voices that have buffers created for them
- //
- DVCLIENTCONFIG_MUTEGLOBAL = $00000010;
- {$EXTERNALSYM DVCLIENTCONFIG_MUTEGLOBAL}
- //
- // Mute the playback
- //
- DVCLIENTCONFIG_PLAYBACKMUTE = $00000002;
- {$EXTERNALSYM DVCLIENTCONFIG_PLAYBACKMUTE}
- //
- // Mute the recording
- //
- DVCLIENTCONFIG_RECORDMUTE = $00000001;
- {$EXTERNALSYM DVCLIENTCONFIG_RECORDMUTE}
- //
- // Complete the operation before returning
- //
- DVFLAGS_SYNC = $00000001;
- {$EXTERNALSYM DVFLAGS_SYNC}
- //
- // Just check to see if wizard has been run, and if so what it's results were
- //
- DVFLAGS_QUERYONLY = $00000002;
- {$EXTERNALSYM DVFLAGS_QUERYONLY}
- //
- // Shutdown the voice session without migrating the host
- //
- DVFLAGS_NOHOSTMIGRATE = $00000008;
- {$EXTERNALSYM DVFLAGS_NOHOSTMIGRATE}
- //
- // Allow the back button to be enabled in the wizard
- //
- DVFLAGS_ALLOWBACK = $00000010;
- {$EXTERNALSYM DVFLAGS_ALLOWBACK}
- //
- // Disable host migration in the voice session
- //
- DVSESSION_NOHOSTMIGRATION = $00000001;
- {$EXTERNALSYM DVSESSION_NOHOSTMIGRATION}
- //
- // Server controlled targetting
- //
- DVSESSION_SERVERCONTROLTARGET = $00000002;
- {$EXTERNALSYM DVSESSION_SERVERCONTROLTARGET}
- //
- // Use DirectSound Normal Mode instead of priority
- //
- DVSOUNDCONFIG_NORMALMODE = $00000001;
- {$EXTERNALSYM DVSOUNDCONFIG_NORMALMODE}
- //
- // Automatically select the microphone
- //
- DVSOUNDCONFIG_AUTOSELECT = $00000002;
- {$EXTERNALSYM DVSOUNDCONFIG_AUTOSELECT}
- //
- // Run in half duplex mode
- //
- DVSOUNDCONFIG_HALFDUPLEX = $00000004;
- {$EXTERNALSYM DVSOUNDCONFIG_HALFDUPLEX}
- //
- // No volume controls are available for the recording device
- //
- DVSOUNDCONFIG_NORECVOLAVAILABLE = $00000010;
- {$EXTERNALSYM DVSOUNDCONFIG_NORECVOLAVAILABLE}
- //
- // Disable capture sharing
- //
- DVSOUNDCONFIG_NOFOCUS = $20000000;
- {$EXTERNALSYM DVSOUNDCONFIG_NOFOCUS}
- //
- // Set system conversion quality to high
- //
- DVSOUNDCONFIG_SETCONVERSIONQUALITY = $00000008;
- {$EXTERNALSYM DVSOUNDCONFIG_SETCONVERSIONQUALITY}
- //
- // Enable strict focus mode
- //
- DVSOUNDCONFIG_STRICTFOCUS = $40000000;
- {$EXTERNALSYM DVSOUNDCONFIG_STRICTFOCUS}
- //
- // Player is in half duplex mode
- //
- DVPLAYERCAPS_HALFDUPLEX = $00000001;
- {$EXTERNALSYM DVPLAYERCAPS_HALFDUPLEX}
- //
- // Specifies that player is the local player
- //
- DVPLAYERCAPS_LOCAL = $00000002;
- {$EXTERNALSYM DVPLAYERCAPS_LOCAL}
- type
- (****************************************************************************
- *
- * DirectPlayVoice Interface Pointer definitions
- *
- ****************************************************************************)
- IDirectPlayVoiceServer = interface;
- (****************************************************************************
- *
- * DirectPlayVoice Structures (Non-Message)
- *
- ****************************************************************************)
- //
- // DirectPlayVoice Caps
- // (GetCaps / SetCaps)
- //
- PDVCaps = ^TDVCaps;
- DVCAPS = packed record
- dwSize: DWORD; // Size of this structure
- dwFlags: DWORD; // Caps flags
- end;
- {$EXTERNALSYM DVCAPS}
- TDVCaps = DVCAPS;
- //
- // DirectPlayVoice Client Configuration
- // (Connect / GetClientConfig)
- //
- PDVClientConfig = ^TDVClientConfig;
- DVCLIENTCONFIG = packed record
- dwSize: DWORD; // Size of this structure
- dwFlags: DWORD; // Flags for client config (DVCLIENTCONFIG_...)
- lRecordVolume: Longint; // Recording volume
- lPlaybackVolume: Longint; // Playback volume
- dwThreshold: DWORD; // Voice Activation Threshold
- dwBufferQuality: DWORD; // Buffer quality
- dwBufferAggressiveness: DWORD; // Buffer aggressiveness
- dwNotifyPeriod: DWORD; // Period of notification messages (ms)
- end;
- {$EXTERNALSYM DVCLIENTCONFIG}
- TDVClientConfig = DVCLIENTCONFIG;
- //
- // DirectPlayVoice Compression Type Information
- // (GetCompressionTypes)
- //
- PDVCompressionInfo = ^TDVCompressionInfo;
- DVCOMPRESSIONINFO = packed record
- dwSize: DWORD; // Size of this structure
- guidType: TGUID; // GUID that identifies this compression type
- lpszName: PWideChar; // String name of this compression type
- lpszDescription: PWideChar; // Description for this compression type
- dwFlags: DWORD; // Flags for this compression type
- dwMaxBitsPerSecond: DWORD; // Maximum # of bit/s this compression type uses
- end;
- {$EXTERNALSYM DVCOMPRESSIONINFO}
- TDVCompressionInfo = DVCOMPRESSIONINFO;
- //
- // DirectPlayVoice Session Description
- // (Host / GetSessionDesc)
- //
- PDVSessionDesc = ^TDVSessionDesc;
- DVSESSIONDESC = packed record
- dwSize: DWORD; // Size of this structure
- dwFlags: DWORD; // Session flags (DVSESSION_...)
- dwSessionType: DWORD; // Session type (DVSESSIONTYPE_...)
- guidCT: TGUID; // Compression Type to use
- dwBufferQuality: DWORD; // Buffer quality
- dwBufferAggressiveness: DWORD; // Buffer aggresiveness
- end;
- {$EXTERNALSYM DVSESSIONDESC}
- TDVSessionDesc = DVSESSIONDESC;
- //
- // DirectPlayVoice Client Sound Device Configuration
- // (Connect / GetSoundDeviceConfig)
- //
- PDVSoundDeviceConfig = ^TDVSoundDeviceConfig;
- DVSOUNDDEVICECONFIG = packed record
- dwSize: DWORD; // Size of this structure
- dwFlags: DWORD; // Flags for sound config (DVSOUNDCONFIG_...)
- guidPlaybackDevice: TGUID; // GUID of the playback device to use
- lpdsPlaybackDevice: IDirectSound; // DirectSound Object to use (optional)
- guidCaptureDevice: TGUID; // GUID of the capture device to use
- lpdsCaptureDevice: IDirectSoundCapture; // DirectSoundCapture Object to use (optional)
- hwndAppWindow: HWND; // HWND of your application's top-level window
- lpdsMainBuffer: IDirectSoundBuffer; // DirectSoundBuffer to use for playback (optional)
- dwMainBufferFlags: DWORD; // Flags to pass to Play() on the main buffer
- dwMainBufferPriority: DWORD; // Priority to set when calling Play() on the main buffer
- end;
- {$EXTERNALSYM DVSOUNDDEVICECONFIG}
- TDVSoundDeviceConfig = DVSOUNDDEVICECONFIG;
- (****************************************************************************
- *
- * DirectPlayVoice message handler call back structures
- *
- ****************************************************************************)
- //
- // Result of the Connect() call. (If it wasn't called Async)
- // (DVMSGID_CONNECTRESULT)
- //
- PDVMsgConnectResult = ^TDVMsgConnectResult;
- DVMSG_CONNECTRESULT = packed record
- dwSize: DWORD; // Size of this structure
- hrResult: HRESULT; // Result of the Connect() call
- end;
- {$EXTERNALSYM DVMSG_CONNECTRESULT}
- TDVMsgConnectResult = DVMSG_CONNECTRESULT;
- //
- // A new player has entered the voice session
- // (DVMSGID_CREATEVOICEPLAYER)
- //
- PDVMsgCreateVoicePlayer = ^TDVMsgCreateVoicePlayer;
- DVMSG_CREATEVOICEPLAYER = packed record
- dwSize: DWORD; // Size of this structure
- dvidPlayer: TDVID; // DVID of the player who joined
- dwFlags: DWORD; // Player flags (DVPLAYERCAPS_...)
- pvPlayerContext: Pointer; // Context value for this player (user set)
- end;
- {$EXTERNALSYM DVMSG_CREATEVOICEPLAYER}
- TDVMsgCreateVoicePlayer = DVMSG_CREATEVOICEPLAYER;
- //
- // A player has left the voice session
- // (DVMSGID_DELETEVOICEPLAYER)
- //
- PDVMsgDeleteVoicePlayer = ^TDVMsgDeleteVoicePlayer;
- DVMSG_DELETEVOICEPLAYER = packed record
- dwSize: DWORD; // Size of this structure
- dvidPlayer: TDVID; // DVID of the player who left
- pvPlayerContext: Pointer; // Context value for the player
- end;
- {$EXTERNALSYM DVMSG_DELETEVOICEPLAYER}
- TDVMsgDeleteVoicePlayer = DVMSG_DELETEVOICEPLAYER;
- //
- // Result of the Disconnect() call. (If it wasn't called Async)
- // (DVMSGID_DISCONNECTRESULT)
- //
- PDVMsgDisconnectResult = ^TDVMsgDisconnectResult;
- DVMSG_DISCONNECTRESULT = packed record
- dwSize: DWORD; // Size of this structure
- hrResult: HRESULT; // Result of the Disconnect() call
- end;
- {$EXTERNALSYM DVMSG_DISCONNECTRESULT}
- TDVMsgDisconnectResult = DVMSG_DISCONNECTRESULT;
- //
- // The voice session host has migrated.
- // (DVMSGID_HOSTMIGRATED)
- //
- PDVMsgHostMigrated = ^TDVMsgHostMigrated;
- DVMSG_HOSTMIGRATED = packed record
- dwSize: DWORD; // Size of this structure
- dvidNewHostID: TDVID; // DVID of the player who is now the host
- pdvServerInterface: IDirectPlayVoiceServer; // Pointer to the new host object (if local player is now host)
- end;
- {$EXTERNALSYM DVMSG_HOSTMIGRATED}
- TDVMsgHostMigrated = DVMSG_HOSTMIGRATED;
- //
- // The current input level / recording volume on the local machine
- // (DVMSGID_INPUTLEVEL)
- //
- PDVMsgInputlevel = ^TDVMsgInputlevel;
- DVMSG_INPUTLEVEL = packed record
- dwSize: DWORD; // Size of this structure
- dwPeakLevel: DWORD; // Current peak level of the audio
- lRecordVolume: Longint; // Current recording volume
- pvLocalPlayerContext: Pointer; // Context value for the local player
- end;
- {$EXTERNALSYM DVMSG_INPUTLEVEL}
- TDVMsgInputlevel = DVMSG_INPUTLEVEL;
- //
- // The local client is about to become the new host
- // (DVMSGID_LOCALHOSTSETUP)
- //
- PDVMsgLocalHostSetup = ^TDVMsgLocalHostSetup;
- DVMSG_LOCALHOSTSETUP = packed record
- dwSize: DWORD; // Size of this structure
- pvContext: Pointer; // Context value to be passed to Initialize() of new host object
- pMessageHandler: TDVMessageHandler; // Message handler to be used by new host object
- end;
- {$EXTERNALSYM DVMSG_LOCALHOSTSETUP}
- TDVMsgLocalHostSetup = DVMSG_LOCALHOSTSETUP;
- //
- // The current output level for the combined output of all incoming streams.
- // (DVMSGID_OUTPUTLEVEL)
- //
- PDVMsgOutputLevel = ^TDVMsgOutputLevel;
- DVMSG_OUTPUTLEVEL = packed record
- dwSize: DWORD; // Size of this structure
- dwPeakLevel: DWORD; // Current peak level of the output
- lOutputVolume: Longint; // Current playback volume
- pvLocalPlayerContext: Pointer; // Context value for the local player
- end;
- {$EXTERNALSYM DVMSG_OUTPUTLEVEL}
- TDVMsgOutputLevel = DVMSG_OUTPUTLEVEL;
- //
- // The current peak level of an individual player's incoming audio stream as it is
- // being played back.
- // (DVMSGID_PLAYEROUTPUTLEVEL)
- //
- PDVMsgPlayerOutputLevel = ^TDVMsgPlayerOutputLevel;
- DVMSG_PLAYEROUTPUTLEVEL = packed record
- dwSize: DWORD; // Size of this structure
- dvidSourcePlayerID: TDVID; // DVID of the player
- dwPeakLevel: DWORD; // Peak level of the player's stream
- pvPlayerContext: Pointer; // Context value for the player
- end;
- {$EXTERNALSYM DVMSG_PLAYEROUTPUTLEVEL}
- TDVMsgPlayerOutputLevel = DVMSG_PLAYEROUTPUTLEVEL;
- //
- // An audio stream from the specified player has started playing back on the local client.
- // (DVMSGID_PLAYERVOICESTART).
- //
- PDVMsgPlayerVoiceStart = ^TDVMsgPlayerVoiceStart;
- DVMSG_PLAYERVOICESTART = packed record
- dwSize: DWORD; // Size of this structure
- dvidSourcePlayerID: TDVID; // DVID of the Player
- pvPlayerContext: Pointer; // Context value for this player
- end;
- {$EXTERNALSYM DVMSG_PLAYERVOICESTART}
- TDVMsgPlayerVoiceStart = DVMSG_PLAYERVOICESTART;
- //
- // The audio stream from the specified player has stopped playing back on the local client.
- // (DVMSGID_PLAYERVOICESTOP)
- //
- PDVMsgPlayerVoiceStop = ^TDVMsgPlayerVoiceStop;
- DVMSG_PLAYERVOICESTOP = packed record
- dwSize: DWORD; // Size of this structure
- dvidSourcePlayerID: DVID; // DVID of the player
- pvPlayerContext: Pointer; // Context value for this player
- end;
- {$EXTERNALSYM DVMSG_PLAYERVOICESTOP}
- TDVMsgPlayerVoiceStop = DVMSG_PLAYERVOICESTOP;
- //
- // Transmission has started on the local machine
- // (DVMSGID_RECORDSTART)
- //
- PDVMsgRecordStart = ^TDVMsgRecordStart;
- DVMSG_RECORDSTART = packed record
- dwSize: DWORD; // Size of this structure
- dwPeakLevel: DWORD; // Peak level that caused transmission to start
- pvLocalPlayerContext: Pointer; // Context value for the local player
- end;
- {$EXTERNALSYM DVMSG_RECORDSTART}
- TDVMsgRecordStart = DVMSG_RECORDSTART;
- //
- // Transmission has stopped on the local machine
- // (DVMSGID_RECORDSTOP)
- //
- PDVMsgRecordStop = ^TDVMsgRecordStop;
- DVMSG_RECORDSTOP = packed record
- dwSize: DWORD; // Size of this structure
- dwPeakLevel: DWORD; // Peak level that caused transmission to stop
- pvLocalPlayerContext: Pointer; // Context value for the local player
- end;
- {$EXTERNALSYM DVMSG_RECORDSTOP}
- TDVMsgRecordStop = DVMSG_RECORDSTOP;
- //
- // The voice session has been lost
- // (DVMSGID_SESSIONLOST)
- //
- PDVMsgSessionLost = ^TDVMsgSessionLost;
- DVMSG_SESSIONLOST = packed record
- dwSize: DWORD; // Size of this structure
- hrResult: HRESULT; // Reason the session was disconnected
- end;
- {$EXTERNALSYM DVMSG_SESSIONLOST}
- TDVMsgSessionLost = DVMSG_SESSIONLOST;
- //
- // The target list has been updated for the local client
- // (DVMSGID_SETTARGETS)
- //
- PDVMsgSetTargets = ^TDVMsgSetTargets;
- DVMSG_SETTARGETS = packed record
- dwSize: DWORD; // Size of this structure
- dwNumTargets: DWORD; // # of targets
- pdvidTargets: PDVID; // An array of DVIDs specifying the current targets
- end;
- {$EXTERNALSYM DVMSG_SETTARGETS}
- TDVMsgSetTargets = DVMSG_SETTARGETS;
- (****************************************************************************
- *
- * DirectPlayVoice Functions
- *
- ****************************************************************************)
- (*
- *
- * This function is no longer supported. It is recommended that CoCreateInstance be used to create
- * DirectPlay voice objects.
- *
- * extern HRESULT WINAPI DirectPlayVoiceCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown);
- *
- *)
- (****************************************************************************
- *
- * DirectPlay8 Application Interfaces
- *
- ****************************************************************************)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlayVoiceClient);'}
- {$EXTERNALSYM IDirectPlayVoiceClient}
- IDirectPlayVoiceClient = interface(IUnknown)
- ['{1dfdc8ea-bcf7-41d6-b295-ab64b3b23306}']
- (*** IDirectPlayVoiceClient methods ***)
- function Initialize(pVoid: IUnknown; pMessageHandler: TDVMessageHandler;
- pUserContext: Pointer; pdwMessageMask: PDWORD; dwMessageMaskElements: DWORD): HResult; stdcall;
- function Connect(const pSoundDeviceConfig: TDVSoundDeviceConfig;
- const pdvClientConfig: TDVClientConfig; dwFlags: DWORD): HResult; stdcall;
- function Disconnect(dwFlags: DWORD): HResult; stdcall;
- function GetSessionDesc(out pvSessionDesc: TDVSessionDesc): HResult; stdcall;
- function GetClientConfig(out pClientConfig: TDVClientConfig): HResult; stdcall;
- function SetClientConfig(const pClientConfig: TDVClientConfig): HResult; stdcall;
- function GetCaps(out pDVCaps: TDVCaps): HResult; stdcall;
- function GetCompressionTypes(pData: Pointer; var pdwDataSize: DWORD;
- out pdwNumElements: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetTransmitTargets(pdvIDTargets: PDVID; dwNumTargets, dwFlags: DWORD): HResult; stdcall;
- function GetTransmitTargets(pdvIDTargets: PDVID; var dwNumTargets: DWORD; dwFlags: DWORD): HResult; stdcall;
- function Create3DSoundBuffer(dvID: TDVID; lpdsSourceBuffer: IDirectSoundBuffer;
- dwPriority, dwFlags: DWORD; out lpUserBuffer: IDirectSound3DBuffer): HResult; stdcall;
- function Delete3DSoundBuffer(dvID: TDVID; lpUserBuffer: IDirectSound3DBuffer): HResult; stdcall;
- function SetNotifyMask(pdwMessageMask: PDWORD; dwMessageMaskElements: DWORD): HResult; stdcall;
- function GetSoundDeviceConfig(pSoundDeviceConfig: PDVSoundDeviceConfig; var pdwSize: DWORD): HResult; stdcall;
- end;
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlayVoiceServer);'}
- {$EXTERNALSYM IDirectPlayVoiceServer}
- IDirectPlayVoiceServer = interface(IUnknown)
- ['{faa1c173-0468-43b6-8a2a-ea8a4f2076c9}']
- (*** IDirectPlayVoiceServer methods ***)
- function Initialize(pVoid: IUnknown; pMessageHandler: TDVMessageHandler;
- pUserContext: Pointer; pdwMessageMask: PDWORD; dwMessageMaskElements: DWORD): HResult; stdcall;
- function StartSession(const pSessionDesc: TDVSessionDesc; dwFlags: DWORD): HResult; stdcall;
- function StopSession(dwFlags: DWORD): HResult; stdcall;
- function GetSessionDesc(out pvSessionDesc: TDVSessionDesc): HResult; stdcall;
- function SetSessionDesc(const pvSessionDesc: TDVSessionDesc): HResult; stdcall;
- function GetCaps(out pDVCaps: TDVCaps): HResult; stdcall;
- function GetCompressionTypes(pData: Pointer; var pdwDataSize: DWORD;
- out pdwNumElements: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetTransmitTargets(dvSource: TDVID; pdvIDTargets: PDVID;
- dwNumTargets, dwFlags: DWORD): HResult; stdcall;
- function GetTransmitTargets(dvSource: TDVID; pdvIDTargets: PDVID;
- var dwNumTargets: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetNotifyMask(pdwMessageMask: PDWORD; dwMessageMaskElements: DWORD): HResult; stdcall;
- end;
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectPlayVoiceTest);'}
- {$EXTERNALSYM IDirectPlayVoiceTest}
- IDirectPlayVoiceTest = interface(IUnknown)
- ['{d26af734-208b-41da-8224-e0ce79810be1}']
- (*** IDirectPlayVoiceTest methods ***)
- function CheckAudioSetup(pguidPlaybackDevice, pguidCaptureDevice: PGUID;
- hwndParent: hWND; dwFlags: DWORD): HResult; stdcall;
- end;
- (****************************************************************************
- *
- * DirectPlayVoice Interface IIDs
- *
- ****************************************************************************)
- // {1DFDC8EA-BCF7-41d6-B295-AB64B3B23306}
- IID_IDirectPlayVoiceClient = IDirectPlayVoiceClient;
- {$EXTERNALSYM IID_IDirectPlayVoiceClient}
- // {FAA1C173-0468-43b6-8A2A-EA8A4F2076C9}
- IID_IDirectPlayVoiceServer = IDirectPlayVoiceServer;
- {$EXTERNALSYM IID_IDirectPlayVoiceServer}
- // {D26AF734-208B-41da-8224-E0CE79810BE1}
- IID_IDirectPlayVoiceTest = IDirectPlayVoiceTest;
- {$EXTERNALSYM IID_IDirectPlayVoiceTest}
- (****************************************************************************
- *
- * DIRECTPLAYVOICE ERRORS
- *
- * Errors are represented by negative values and cannot be combined.
- *
- ****************************************************************************)
- const
- _FACDPV = $15;
- {$EXTERNALSYM _FACDPV}
- //#define MAKE_DVHRESULT( code ) MAKE_HRESULT( 1, _FACDPV, code )
- (*
- #define DV_FULLDUPLEX MAKE_HRESULT( 0, _FACDPV, 0x0005 )
- #define DV_HALFDUPLEX MAKE_HRESULT( 0, _FACDPV, 0x000A )
- #define DV_PENDING MAKE_HRESULT( 0, _FACDPV, 0x0010 )
- #define DVERR_BUFFERTOOSMALL MAKE_DVHRESULT( 0x001E )
- #define DVERR_EXCEPTION MAKE_DVHRESULT( 0x004A )
- #define DVERR_GENERIC E_FAIL
- #define DVERR_INVALIDFLAGS MAKE_DVHRESULT( 0x0078 )
- #define DVERR_INVALIDOBJECT MAKE_DVHRESULT( 0x0082 )
- #define DVERR_INVALIDPARAM E_INVALIDARG
- #define DVERR_INVALIDPLAYER MAKE_DVHRESULT( 0x0087 )
- #define DVERR_INVALIDGROUP MAKE_DVHRESULT( 0x0091 )
- #define DVERR_INVALIDHANDLE MAKE_DVHRESULT( 0x0096 )
- #define DVERR_OUTOFMEMORY E_OUTOFMEMORY
- #define DVERR_PENDING DV_PENDING
- #define DVERR_NOTSUPPORTED E_NOTIMPL
- #define DVERR_NOINTERFACE E_NOINTERFACE
- #define DVERR_SESSIONLOST MAKE_DVHRESULT( 0x012C )
- #define DVERR_NOVOICESESSION MAKE_DVHRESULT( 0x012E )
- #define DVERR_CONNECTIONLOST MAKE_DVHRESULT( 0x0168 )
- #define DVERR_NOTINITIALIZED MAKE_DVHRESULT( 0x0169 )
- #define DVERR_CONNECTED MAKE_DVHRESULT( 0x016A )
- #define DVERR_NOTCONNECTED MAKE_DVHRESULT( 0x016B )
- #define DVERR_CONNECTABORTING MAKE_DVHRESULT( 0x016E )
- #define DVERR_NOTALLOWED MAKE_DVHRESULT( 0x016F )
- #define DVERR_INVALIDTARGET MAKE_DVHRESULT( 0x0170 )
- #define DVERR_TRANSPORTNOTHOST MAKE_DVHRESULT( 0x0171 )
- #define DVERR_COMPRESSIONNOTSUPPORTED MAKE_DVHRESULT( 0x0172 )
- #define DVERR_ALREADYPENDING MAKE_DVHRESULT( 0x0173 )
- #define DVERR_SOUNDINITFAILURE MAKE_DVHRESULT( 0x0174 )
- #define DVERR_TIMEOUT MAKE_DVHRESULT( 0x0175 )
- #define DVERR_CONNECTABORTED MAKE_DVHRESULT( 0x0176 )
- #define DVERR_NO3DSOUND MAKE_DVHRESULT( 0x0177 )
- #define DVERR_ALREADYBUFFERED MAKE_DVHRESULT( 0x0178 )
- #define DVERR_NOTBUFFERED MAKE_DVHRESULT( 0x0179 )
- #define DVERR_HOSTING MAKE_DVHRESULT( 0x017A )
- #define DVERR_NOTHOSTING MAKE_DVHRESULT( 0x017B )
- #define DVERR_INVALIDDEVICE MAKE_DVHRESULT( 0x017C )
- #define DVERR_RECORDSYSTEMERROR MAKE_DVHRESULT( 0x017D )
- #define DVERR_PLAYBACKSYSTEMERROR MAKE_DVHRESULT( 0x017E )
- #define DVERR_SENDERROR MAKE_DVHRESULT( 0x017F )
- #define DVERR_USERCANCEL MAKE_DVHRESULT( 0x0180 )
- #define DVERR_RUNSETUP MAKE_DVHRESULT( 0x0183 )
- #define DVERR_INCOMPATIBLEVERSION MAKE_DVHRESULT( 0x0184 )
- #define DVERR_INITIALIZED MAKE_DVHRESULT( 0x0187 )
- #define DVERR_INVALIDPOINTER E_POINTER
- #define DVERR_NOTRANSPORT MAKE_DVHRESULT( 0x0188 )
- #define DVERR_NOCALLBACK MAKE_DVHRESULT( 0x0189 )
- #define DVERR_TRANSPORTNOTINIT MAKE_DVHRESULT( 0x018A )
- #define DVERR_TRANSPORTNOSESSION MAKE_DVHRESULT( 0x018B )
- #define DVERR_TRANSPORTNOPLAYER MAKE_DVHRESULT( 0x018C )
- #define DVERR_USERBACK MAKE_DVHRESULT( 0x018D )
- #define DVERR_NORECVOLAVAILABLE MAKE_DVHRESULT( 0x018E )
- #define DVERR_INVALIDBUFFER MAKE_DVHRESULT( 0x018F )
- #define DVERR_LOCKEDBUFFER MAKE_DVHRESULT( 0x0190 )
- *)
- MAKE_DVHRESULT_R = (1 shl 31) or (_FACDPV shl 16);
- DV_OK = S_OK;
- {$EXTERNALSYM DV_OK}
- DV_FULLDUPLEX = (0 shl 31) or (_FACDPV shl 16) or $0005;
- {$EXTERNALSYM DV_FULLDUPLEX}
- DV_HALFDUPLEX = (0 shl 31) or (_FACDPV shl 16) or $000A;
- {$EXTERNALSYM DV_HALFDUPLEX}
- DV_PENDING = (0 shl 31) or (_FACDPV shl 16) or $0010;
- {$EXTERNALSYM DV_PENDING}
- DVERR_BUFFERTOOSMALL = MAKE_DVHRESULT_R + $001E ;
- {$EXTERNALSYM DVERR_BUFFERTOOSMALL}
- DVERR_EXCEPTION = MAKE_DVHRESULT_R + $004A ;
- {$EXTERNALSYM DVERR_EXCEPTION}
- DVERR_GENERIC = E_FAIL;
- {$EXTERNALSYM DVERR_GENERIC}
- DVERR_INVALIDFLAGS = MAKE_DVHRESULT_R + $0078 ;
- {$EXTERNALSYM DVERR_INVALIDFLAGS}
- DVERR_INVALIDOBJECT = MAKE_DVHRESULT_R + $0082 ;
- {$EXTERNALSYM DVERR_INVALIDOBJECT}
- DVERR_INVALIDPARAM = E_INVALIDARG;
- {$EXTERNALSYM DVERR_INVALIDPARAM}
- DVERR_INVALIDPLAYER = MAKE_DVHRESULT_R + $0087 ;
- {$EXTERNALSYM DVERR_INVALIDPLAYER}
- DVERR_INVALIDGROUP = MAKE_DVHRESULT_R + $0091 ;
- {$EXTERNALSYM DVERR_INVALIDGROUP}
- DVERR_INVALIDHANDLE = MAKE_DVHRESULT_R + $0096 ;
- {$EXTERNALSYM DVERR_INVALIDHANDLE}
- DVERR_OUTOFMEMORY = E_OUTOFMEMORY;
- {$EXTERNALSYM DVERR_OUTOFMEMORY}
- DVERR_PENDING = DV_PENDING;
- {$EXTERNALSYM DVERR_PENDING}
- DVERR_NOTSUPPORTED = E_NOTIMPL;
- {$EXTERNALSYM DVERR_NOTSUPPORTED}
- DVERR_NOINTERFACE = E_NOINTERFACE;
- {$EXTERNALSYM DVERR_NOINTERFACE}
- DVERR_SESSIONLOST = MAKE_DVHRESULT_R + $012C ;
- {$EXTERNALSYM DVERR_SESSIONLOST}
- DVERR_NOVOICESESSION = MAKE_DVHRESULT_R + $012E ;
- {$EXTERNALSYM DVERR_NOVOICESESSION}
- DVERR_CONNECTIONLOST = MAKE_DVHRESULT_R + $0168 ;
- {$EXTERNALSYM DVERR_CONNECTIONLOST}
- DVERR_NOTINITIALIZED = MAKE_DVHRESULT_R + $0169 ;
- {$EXTERNALSYM DVERR_NOTINITIALIZED}
- DVERR_CONNECTED = MAKE_DVHRESULT_R + $016A ;
- {$EXTERNALSYM DVERR_CONNECTED}
- DVERR_NOTCONNECTED = MAKE_DVHRESULT_R + $016B ;
- {$EXTERNALSYM DVERR_NOTCONNECTED}
- DVERR_CONNECTABORTING = MAKE_DVHRESULT_R + $016E ;
- {$EXTERNALSYM DVERR_CONNECTABORTING}
- DVERR_NOTALLOWED = MAKE_DVHRESULT_R + $016F ;
- {$EXTERNALSYM DVERR_NOTALLOWED}
- DVERR_INVALIDTARGET = MAKE_DVHRESULT_R + $0170 ;
- {$EXTERNALSYM DVERR_INVALIDTARGET}
- DVERR_TRANSPORTNOTHOST = MAKE_DVHRESULT_R + $0171 ;
- {$EXTERNALSYM DVERR_TRANSPORTNOTHOST}
- DVERR_COMPRESSIONNOTSUPPORTED = MAKE_DVHRESULT_R + $0172 ;
- {$EXTERNALSYM DVERR_COMPRESSIONNOTSUPPORTED}
- DVERR_ALREADYPENDING = MAKE_DVHRESULT_R + $0173 ;
- {$EXTERNALSYM DVERR_ALREADYPENDING}
- DVERR_SOUNDINITFAILURE = MAKE_DVHRESULT_R + $0174 ;
- {$EXTERNALSYM DVERR_SOUNDINITFAILURE}
- DVERR_TIMEOUT = MAKE_DVHRESULT_R + $0175 ;
- {$EXTERNALSYM DVERR_TIMEOUT}
- DVERR_CONNECTABORTED = MAKE_DVHRESULT_R + $0176 ;
- {$EXTERNALSYM DVERR_CONNECTABORTED}
- DVERR_NO3DSOUND = MAKE_DVHRESULT_R + $0177 ;
- {$EXTERNALSYM DVERR_NO3DSOUND}
- DVERR_ALREADYBUFFERED = MAKE_DVHRESULT_R + $0178 ;
- {$EXTERNALSYM DVERR_ALREADYBUFFERED}
- DVERR_NOTBUFFERED = MAKE_DVHRESULT_R + $0179 ;
- {$EXTERNALSYM DVERR_NOTBUFFERED}
- DVERR_HOSTING = MAKE_DVHRESULT_R + $017A ;
- {$EXTERNALSYM DVERR_HOSTING}
- DVERR_NOTHOSTING = MAKE_DVHRESULT_R + $017B ;
- {$EXTERNALSYM DVERR_NOTHOSTING}
- DVERR_INVALIDDEVICE = MAKE_DVHRESULT_R + $017C ;
- {$EXTERNALSYM DVERR_INVALIDDEVICE}
- DVERR_RECORDSYSTEMERROR = MAKE_DVHRESULT_R + $017D ;
- {$EXTERNALSYM DVERR_RECORDSYSTEMERROR}
- DVERR_PLAYBACKSYSTEMERROR = MAKE_DVHRESULT_R + $017E ;
- {$EXTERNALSYM DVERR_PLAYBACKSYSTEMERROR}
- DVERR_SENDERROR = MAKE_DVHRESULT_R + $017F ;
- {$EXTERNALSYM DVERR_SENDERROR}
- DVERR_USERCANCEL = MAKE_DVHRESULT_R + $0180 ;
- {$EXTERNALSYM DVERR_USERCANCEL}
- DVERR_RUNSETUP = MAKE_DVHRESULT_R + $0183 ;
- {$EXTERNALSYM DVERR_RUNSETUP}
- DVERR_INCOMPATIBLEVERSION = MAKE_DVHRESULT_R + $0184 ;
- {$EXTERNALSYM DVERR_INCOMPATIBLEVERSION}
- DVERR_INITIALIZED = MAKE_DVHRESULT_R + $0187 ;
- {$EXTERNALSYM DVERR_INITIALIZED}
- DVERR_INVALIDPOINTER = E_POINTER;
- {$EXTERNALSYM DVERR_INVALIDPOINTER}
- DVERR_NOTRANSPORT = MAKE_DVHRESULT_R + $0188 ;
- {$EXTERNALSYM DVERR_NOTRANSPORT}
- DVERR_NOCALLBACK = MAKE_DVHRESULT_R + $0189 ;
- {$EXTERNALSYM DVERR_NOCALLBACK}
- DVERR_TRANSPORTNOTINIT = MAKE_DVHRESULT_R + $018A ;
- {$EXTERNALSYM DVERR_TRANSPORTNOTINIT}
- DVERR_TRANSPORTNOSESSION = MAKE_DVHRESULT_R + $018B ;
- {$EXTERNALSYM DVERR_TRANSPORTNOSESSION}
- DVERR_TRANSPORTNOPLAYER = MAKE_DVHRESULT_R + $018C ;
- {$EXTERNALSYM DVERR_TRANSPORTNOPLAYER}
- DVERR_USERBACK = MAKE_DVHRESULT_R + $018D ;
- {$EXTERNALSYM DVERR_USERBACK}
- DVERR_NORECVOLAVAILABLE = MAKE_DVHRESULT_R + $018E ;
- {$EXTERNALSYM DVERR_NORECVOLAVAILABLE}
- DVERR_INVALIDBUFFER = MAKE_DVHRESULT_R + $018F ;
- {$EXTERNALSYM DVERR_INVALIDBUFFER}
- DVERR_LOCKEDBUFFER = MAKE_DVHRESULT_R + $0190 ;
- {$EXTERNALSYM DVERR_LOCKEDBUFFER}
- ///////////////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////////////
- // Compatibility types for non-Borland compliant translations of DirectPlay8 //
- ///////////////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////////////
- type
- PDvmsg_Connectresult = PDVMsgConnectResult;
- TDvmsg_Connectresult = TDVMsgConnectResult;
- PDvmsg_Createvoiceplayer = PDVMsgCreateVoicePlayer;
- TDvmsg_Createvoiceplayer = TDVMsgCreateVoicePlayer;
- PDvmsg_Deletevoiceplayer = PDVMsgDeleteVoicePlayer;
- TDvmsg_Deletevoiceplayer = TDVMsgDeleteVoicePlayer;
- PDvmsg_Disconnectresult = PDVMsgDisconnectResult;
- TDvmsg_Disconnectresult = TDVMsgDisconnectResult;
- PDvmsg_Hostmigrated = PDVMsgHostMigrated;
- TDvmsg_Hostmigrated = TDVMsgHostMigrated;
- PDvmsg_Inputlevel = PDVMsgInputlevel;
- TDvmsg_Inputlevel = TDVMsgInputlevel;
- PDvmsg_Localhostsetup = PDVMsgLocalHostSetup;
- TDvmsg_Localhostsetup = TDVMsgLocalHostSetup;
- PDvmsg_Outputlevel = PDVMsgOutputLevel;
- TDvmsg_Outputlevel = TDVMsgOutputLevel;
- PDvmsg_Playeroutputlevel = PDVMsgPlayerOutputLevel;
- TDvmsg_Playeroutputlevel = TDVMsgPlayerOutputLevel;
- PDvmsg_Playervoicestart = PDVMsgPlayerVoiceStart;
- TDvmsg_Playervoicestart = TDVMsgPlayerVoiceStart;
- PDvmsg_Playervoicestop = PDVMsgPlayerVoiceStop;
- TDvmsg_Playervoicestop = TDVMsgPlayerVoiceStop;
- PDvmsg_Recordstart = PDVMsgRecordStart;
- TDvmsg_Recordstart = TDVMsgRecordStart;
- PDvmsg_Recordstop = PDVMsgRecordStop;
- TDvmsg_Recordstop = TDVMsgRecordStop;
- PDvmsg_Sessionlost = PDVMsgSessionLost;
- TDvmsg_Sessionlost = TDVMsgSessionLost;
- PDvmsg_Settargets = PDVMsgSetTargets;
- TDvmsg_Settargets = TDVMsgSetTargets;
- PDPN_Application_Desc = PDPNApplicationDesc;
- TDPN_Application_Desc = TDPNApplicationDesc;
- PDPN_Caps = PDPNCaps;
- TDPN_Caps = TDPNCaps;
- PDPN_Caps_Ex = PDPNCapsEx;
- TDPN_Caps_Ex = TDPNCapsEx;
- PDPN_Connection_Info = PDPNConnectionInfo;
- TDPN_Connection_Info = TDPNConnectionInfo;
- PDPN_Group_Info = PDPNGroupInfo;
- TDPN_Group_Info = TDPNGroupInfo;
- PDPN_Player_Info = PDPNPlayerInfo;
- TDPN_Player_Info = TDPNPlayerInfo;
- PDPN_Security_Credentials = PDPNSecurityCredentials;
- TDPN_Security_Credentials = TDPNSecurityCredentials;
- PDPN_Security_Desc = PDPNSecurityDesc;
- TDPN_Security_Desc = TDPNSecurityDesc;
- PDPN_Service_Provider_Info = PDPNServiceProviderInfo;
- TDPN_Service_Provider_Info = TDPNServiceProviderInfo;
- PDPN_Sp_Caps = PDPNSpCaps;
- TDPN_Sp_Caps = TDPNSpCaps;
- PDPNMsg_Add_Player_To_Group = PDPNMsgAddPlayerToGroup;
- TDPNMsg_Add_Player_To_Group = TDPNMsgAddPlayerToGroup;
- PDPNMsg_Async_Op_Complete = PDPNMsgAsyncOpComplete;
- TDPNMsg_Async_Op_Complete = TDPNMsgAsyncOpComplete;
- PDPNMsg_Client_Info = PDPNMsgClientInfo;
- TDPNMsg_Client_Info = TDPNMsgClientInfo;
- PDPNMsg_Connect_Complete = PDPNMsgConnectComplete;
- TDPNMsg_Connect_Complete = TDPNMsgConnectComplete;
- PDPNMsg_Create_Group = PDPNMsgCreateGroup;
- TDPNMsg_Create_Group = TDPNMsgCreateGroup;
- PDPNMsg_Create_Player = PDPNMsgCreatePlayer;
- TDPNMsg_Create_Player = TDPNMsgCreatePlayer;
- PDPNMsg_Destroy_Group = PDPNMsgDestroyGroup;
- TDPNMsg_Destroy_Group = TDPNMsgDestroyGroup;
- PDPNMsg_Destroy_Player = PDPNMsgDestroyPlayer;
- TDPNMsg_Destroy_Player = TDPNMsgDestroyPlayer;
- PDPNMsg_Enum_Hosts_Query = PDPNMsgEnumHostsQuery;
- TDPNMsg_Enum_Hosts_Query = TDPNMsgEnumHostsQuery;
- PDPNMsg_Enum_Hosts_Response = PDPNMsgEnumHostsResponse;
- TDPNMsg_Enum_Hosts_Response = TDPNMsgEnumHostsResponse;
- PDPNMsg_Group_Info = PDPNMsgGroupInfo;
- TDPNMsg_Group_Info = TDPNMsgGroupInfo;
- PDPNMsg_Host_Migrate = PDPNMsgHostMigrate;
- TDPNMsg_Host_Migrate = TDPNMsgHostMigrate;
- PDPNMsg_Indicate_Connect = PDPNMsgIndicateConnect;
- TDPNMsg_Indicate_Connect = TDPNMsgIndicateConnect;
- PDPNMsg_Indicated_Connect_Aborted = PDPNMsgIndicatedConnectAborted;
- TDPNMsg_Indicated_Connect_Aborted = TDPNMsgIndicatedConnectAborted;
- PDPNMsg_Peer_Info = PDPNMsgPeerInfo;
- TDPNMsg_Peer_Info = TDPNMsgPeerInfo;
- PDPNMsg_Receive = PDPNMsgReceive;
- TDPNMsg_Receive = TDPNMsgReceive;
- PDPNMsg_Remove_Player_From_Group = PDPNMsgRemovePlayerFromGroup;
- TDPNMsg_Remove_Player_From_Group = TDPNMsgRemovePlayerFromGroup;
- PDPNMsg_Return_Buffer = PDPNMsgReturnBuffer;
- TDPNMsg_Return_Buffer = TDPNMsgReturnBuffer;
- PDPNMsg_Send_Complete = PDPNMsgSendComplete;
- TDPNMsg_Send_Complete = TDPNMsgSendComplete;
- PDPNMsg_Server_Info = PDPNMsgServerInfo;
- TDPNMsg_Server_Info = TDPNMsgServerInfo;
- PDPNMsg_Terminate_Session = PDPNMsgTerminateSession;
- TDPNMsg_Terminate_Session = TDPNMsgTerminateSession;
- PDPNMsg_Create_Thread = PDPNMsgCreateThread;
- TDPNMsg_Create_Thread = TDPNMsgCreateThread;
- PDPNMsg_Destroy_Thread = PDPNMsgDestroyThread;
- TDPNMsg_Destroy_Thread = TDPNMsgDestroyThread;
- PDPNMsg_Nat_Resolver_Query = PDPNMsgNatResolverQuery;
- TDPNMsg_Nat_Resolver_Query = TDPNMsgNatResolverQuery;
- implementation
- // #define MAKE_DPNHRESULT( code ) MAKE_HRESULT( 1, _DPN_FACILITY_CODE, ( code + _DPNHRESULT_BASE ) )
- function MAKE_DPNHRESULT(Code: DWORD): DWORD;
- begin
- Result:= DWord((1 shl 31) or (_DPN_FACILITY_CODE shl 16)) or (Code + _DPNHRESULT_BASE);
- end;
- end.