diff --git a/dependencies/DXSDK_Aug2007/include/dplobby.h b/dependencies/DXSDK_Aug2007/include/dplobby.h new file mode 100644 index 00000000..18aca4fe --- /dev/null +++ b/dependencies/DXSDK_Aug2007/include/dplobby.h @@ -0,0 +1,852 @@ +/*==========================================================================; + * + * Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved. + * + * File: dplobby.h + * Content: DirectPlayLobby include file + ***************************************************************************/ +#ifndef __DPLOBBY_INCLUDED__ +#define __DPLOBBY_INCLUDED__ + +#include "dplay.h" + +/* avoid warnings at Level 4 */ +#pragma warning(disable:4201) + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * GUIDS used by DirectPlay objects + */ + +/* {AF465C71-9588-11cf-A020-00AA006157AC} */ +DEFINE_GUID(IID_IDirectPlayLobby, 0xaf465c71, 0x9588, 0x11cf, 0xa0, 0x20, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac); +/* {26C66A70-B367-11cf-A024-00AA006157AC} */ +DEFINE_GUID(IID_IDirectPlayLobbyA, 0x26c66a70, 0xb367, 0x11cf, 0xa0, 0x24, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac); +/* {0194C220-A303-11d0-9C4F-00A0C905425E} */ +DEFINE_GUID(IID_IDirectPlayLobby2, 0x194c220, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); +/* {1BB4AF80-A303-11d0-9C4F-00A0C905425E} */ +DEFINE_GUID(IID_IDirectPlayLobby2A, 0x1bb4af80, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); +/* {2DB72490-652C-11d1-A7A8-0000F803ABFC} */ +DEFINE_GUID(IID_IDirectPlayLobby3, 0x2db72490, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); +/* {2DB72491-652C-11d1-A7A8-0000F803ABFC} */ +DEFINE_GUID(IID_IDirectPlayLobby3A, 0x2db72491, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); +/* {2FE8F810-B2A5-11d0-A787-0000F803ABFC} */ +DEFINE_GUID(CLSID_DirectPlayLobby, 0x2fe8f810, 0xb2a5, 0x11d0, 0xa7, 0x87, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); + + +/**************************************************************************** + * + * IDirectPlayLobby Structures + * + * Various structures used to invoke DirectPlayLobby. + * + ****************************************************************************/ + +typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBY; +typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBYA; +typedef struct IDirectPlayLobby IDirectPlayLobbyA; + +typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2; +typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2A; +typedef struct IDirectPlayLobby2 IDirectPlayLobby2A; + +typedef struct IDirectPlayLobby3 FAR *LPDIRECTPLAYLOBBY3; +typedef struct IDirectPlayLobby3 FAR *LPDIRECTPLAYLOBBY3A; +typedef struct IDirectPlayLobby3 IDirectPlayLobby3A; + + +/* + * DPLAPPINFO + * Used to hold information about a registered DirectPlay + * application + */ +typedef struct DPLAPPINFO +{ + DWORD dwSize; // Size of this structure + GUID guidApplication; // GUID of the Application + union + { + LPSTR lpszAppNameA; // Pointer to the Application Name + LPWSTR lpszAppName; + }; + +} DPLAPPINFO, FAR *LPDPLAPPINFO; + +/* + * LPCDPLAPPINFO + * A constant pointer to DPLAPPINFO + */ +typedef const DPLAPPINFO FAR *LPCDPLAPPINFO; + +/* + * DPCOMPOUNDADDRESSELEMENT + * + * An array of these is passed to CreateCompoundAddresses() + */ +typedef struct DPCOMPOUNDADDRESSELEMENT +{ + GUID guidDataType; + DWORD dwDataSize; + LPVOID lpData; +} DPCOMPOUNDADDRESSELEMENT, FAR *LPDPCOMPOUNDADDRESSELEMENT; + +/* + * LPCDPCOMPOUNDADDRESSELEMENT + * A constant pointer to DPCOMPOUNDADDRESSELEMENT + */ +typedef const DPCOMPOUNDADDRESSELEMENT FAR *LPCDPCOMPOUNDADDRESSELEMENT; + +/* + * LPDPAPPLICATIONDESC + * Used to register a DirectPlay application + */ +typedef struct DPAPPLICATIONDESC +{ + DWORD dwSize; + DWORD dwFlags; + union + { + LPSTR lpszApplicationNameA; + LPWSTR lpszApplicationName; + }; + GUID guidApplication; + union + { + LPSTR lpszFilenameA; + LPWSTR lpszFilename; + }; + union + { + LPSTR lpszCommandLineA; + LPWSTR lpszCommandLine; + }; + union + { + LPSTR lpszPathA; + LPWSTR lpszPath; + }; + union + { + LPSTR lpszCurrentDirectoryA; + LPWSTR lpszCurrentDirectory; + }; + LPSTR lpszDescriptionA; + LPWSTR lpszDescriptionW; +} DPAPPLICATIONDESC, *LPDPAPPLICATIONDESC; + +/* + * LPDPAPPLICATIONDESC2 + * Used to register a DirectPlay application + */ +typedef struct DPAPPLICATIONDESC2 +{ + DWORD dwSize; + DWORD dwFlags; + union + { + LPSTR lpszApplicationNameA; + LPWSTR lpszApplicationName; + }; + GUID guidApplication; + union + { + LPSTR lpszFilenameA; + LPWSTR lpszFilename; + }; + union + { + LPSTR lpszCommandLineA; + LPWSTR lpszCommandLine; + }; + union + { + LPSTR lpszPathA; + LPWSTR lpszPath; + }; + union + { + LPSTR lpszCurrentDirectoryA; + LPWSTR lpszCurrentDirectory; + }; + LPSTR lpszDescriptionA; + LPWSTR lpszDescriptionW; + union + { + LPSTR lpszAppLauncherNameA; + LPWSTR lpszAppLauncherName; + }; +} DPAPPLICATIONDESC2, *LPDPAPPLICATIONDESC2; + + +/**************************************************************************** + * + * Enumeration Method Callback Prototypes + * + ****************************************************************************/ + +/* + * Callback for EnumAddress() + */ +typedef BOOL (FAR PASCAL *LPDPENUMADDRESSCALLBACK)( + REFGUID guidDataType, + DWORD dwDataSize, + LPCVOID lpData, + LPVOID lpContext); + +/* + * Callback for EnumAddressTypes() + */ +typedef BOOL (FAR PASCAL *LPDPLENUMADDRESSTYPESCALLBACK)( + REFGUID guidDataType, + LPVOID lpContext, + DWORD dwFlags); + +/* + * Callback for EnumLocalApplications() + */ +typedef BOOL (FAR PASCAL * LPDPLENUMLOCALAPPLICATIONSCALLBACK)( + LPCDPLAPPINFO lpAppInfo, + LPVOID lpContext, + DWORD dwFlags); + + +/**************************************************************************** + * + * DirectPlayLobby API Prototypes + * + ****************************************************************************/ +#ifdef UNICODE +#define DirectPlayLobbyCreate DirectPlayLobbyCreateW +#else +#define DirectPlayLobbyCreate DirectPlayLobbyCreateA +#endif /* UNICODE */ + +extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD ); +extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD ); + + +/**************************************************************************** + * + * IDirectPlayLobby (and IDirectPlayLobbyA) Interface + * + ****************************************************************************/ +#undef INTERFACE +#define INTERFACE IDirectPlayLobby +DECLARE_INTERFACE_( IDirectPlayLobby, IUnknown ) +{ + /* IUnknown Methods */ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectPlayLobby Methods */ + STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE; + STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE; + STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE; + STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE; + STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE; + STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE; + STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE; + STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE; + +}; + +/**************************************************************************** + * + * IDirectPlayLobby2 (and IDirectPlayLobby2A) Interface + * + ****************************************************************************/ +#undef INTERFACE +#define INTERFACE IDirectPlayLobby2 +DECLARE_INTERFACE_( IDirectPlayLobby2, IDirectPlayLobby ) +{ + /* IUnknown Methods */ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectPlayLobby Methods */ + STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE; + STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE; + STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE; + STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE; + STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE; + STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE; + STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE; + STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE; + + /* IDirectPlayLobby2 Methods */ + STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE; +}; + +/**************************************************************************** + * + * IDirectPlayLobby3 (and IDirectPlayLobby3A) Interface + * + ****************************************************************************/ +#undef INTERFACE +#define INTERFACE IDirectPlayLobby3 +DECLARE_INTERFACE_( IDirectPlayLobby3, IDirectPlayLobby ) +{ + /* IUnknown Methods */ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectPlayLobby Methods */ + STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE; + STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE; + STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE; + STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE; + STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE; + STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE; + STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE; + STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE; + + /* IDirectPlayLobby2 Methods */ + STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE; + + /* IDirectPlayLobby3 Methods */ + STDMETHOD(ConnectEx) (THIS_ DWORD, REFIID, LPVOID *, IUnknown FAR *) PURE; + STDMETHOD(RegisterApplication) (THIS_ DWORD, LPVOID) PURE; + STDMETHOD(UnregisterApplication)(THIS_ DWORD, REFGUID) PURE; + STDMETHOD(WaitForConnectionSettings)(THIS_ DWORD) PURE; +}; + +/**************************************************************************** + * + * IDirectPlayLobby interface macros + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlayLobby_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlayLobby_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlayLobby_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c) +#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->lpVtbl->ConnectEx(p,a,b,c,d) +#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->lpVtbl->CreateAddress(p,a,b,c,d,e,f) +#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(p,a,b,c,d) +#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->lpVtbl->EnumAddress(p,a,b,c,d) +#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->lpVtbl->EnumAddressTypes(p,a,b,c,d) +#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->lpVtbl->EnumLocalApplications(p,a,b,c) +#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->lpVtbl->GetConnectionSettings(p,a,b,c) +#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->lpVtbl->ReceiveLobbyMessage(p,a,b,c,d,e) +#define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->lpVtbl->RegisterApplication(p,a,b) +#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->lpVtbl->RunApplication(p,a,b,c,d) +#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->lpVtbl->SendLobbyMessage(p,a,b,c,d) +#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c) +#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->lpVtbl->SetLobbyMessageEvent(p,a,b,c) +#define IDirectPlayLobby_UnregisterApplication(p,a,b) (p)->lpVtbl->UnregisterApplication(p,a,b) +#define IDirectPlayLobby_WaitForConnectionSettings(p,a) (p)->lpVtbl->WaitForConnectionSettings(p,a) + +#else /* C++ */ + +#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlayLobby_AddRef(p) (p)->AddRef() +#define IDirectPlayLobby_Release(p) (p)->Release() +#define IDirectPlayLobby_Connect(p,a,b,c) (p)->Connect(a,b,c) +#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->ConnectEx(a,b,c,d) +#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->CreateAddress(a,b,c,d,e,f) +#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->CreateCompoundAddress(a,b,c,d) +#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->EnumAddress(a,b,c,d) +#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->EnumAddressTypes(a,b,c,d) +#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->EnumLocalApplications(a,b,c) +#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->GetConnectionSettings(a,b,c) +#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->ReceiveLobbyMessage(a,b,c,d,e) +#define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->RegisterApplication(a,b) +#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->RunApplication(a,b,c,d) +#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->SendLobbyMessage(a,b,c,d) +#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c) +#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->SetLobbyMessageEvent(a,b,c) +#define IDirectPlayLobby_UnregisterApplication(p,a,b) (p)->UnregisterApplication(a,b) +#define IDirectPlayLobby_WaitForConnectionSettings(p,a) (p)->WaitForConnectionSettings(a) + +#endif + +/**************************************************************************** + * + * DirectPlayLobby Flags + * + ****************************************************************************/ + +/* + * This flag is used by IDirectPlayLobby->WaitForConnectionSettings to + * cancel a current wait that is in progress. + */ +#define DPLWAIT_CANCEL 0x00000001 + + +/* + * This is a message flag used by ReceiveLobbyMessage. It can be + * returned in the dwMessageFlags parameter to indicate a message from + * the system. + */ +#define DPLMSG_SYSTEM 0x00000001 + +/* + * 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 + */ +#define DPLMSG_STANDARD 0x00000002 + +/* + * Lobbyable Application registration flags + */ + +/* + * Applications registered with this flag will not show up when + * applications are enumerated in the lobby. This application + * will only be able to be launched by a lobby client that already + * knows about the application. + */ +#define DPLAPP_NOENUM 0x80000000 + +/* + * Applications registered with this flag want voice to automatically + * be enabled for their application. All players will be launched into + * an 'n'-way voice conference when the application is started. The + * user will be able to enable this flag for existing non-voice + * directplay applications. + */ +#define DPLAPP_AUTOVOICE 0x00000001 + +/* + * Applications that do their own voice conferencing should register with + * this flag to avoid allowing the user to enable other voice chat + * capabilites during the same session. This is to avoid users forcing + * the DPLAPP_AUTOVOICE flag for the application. + */ +#define DPLAPP_SELFVOICE 0x00000002 + +/**************************************************************************** + * + * 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. + */ +typedef struct _DPLMSG_GENERIC +{ + DWORD dwType; // Message type +} DPLMSG_GENERIC, FAR *LPDPLMSG_GENERIC; + +/* + * DPLMSG_SYSTEMMESSAGE + * Generic message format for all system messages -- + * DPLSYS_CONNECTIONSETTINGSREAD, DPLSYS_DPLYCONNECTSUCCEEDED, + * DPLSYS_DPLAYCONNECTFAILED, DPLSYS_APPTERMINATED, DPLSYS_NEWCONNECTIONSETTINGS + */ +typedef struct _DPLMSG_SYSTEMMESSAGE +{ + DWORD dwType; // Message type + GUID guidInstance; // Instance GUID of the dplay session the message corresponds to +} DPLMSG_SYSTEMMESSAGE, FAR *LPDPLMSG_SYSTEMMESSAGE; + +/* + * DPLMSG_SETPROPERTY + * Standard message sent by an application to a lobby to set a + * property + */ +typedef struct _DPLMSG_SETPROPERTY +{ + DWORD dwType; // Message type + DWORD dwRequestID; // Request ID (DPL_NOCONFIRMATION if no confirmation desired) + GUID guidPlayer; // Player GUID + GUID guidPropertyTag; // Property GUID + DWORD dwDataSize; // Size of data + DWORD dwPropertyData[1]; // Buffer containing data +} DPLMSG_SETPROPERTY, FAR *LPDPLMSG_SETPROPERTY; + +#define DPL_NOCONFIRMATION 0 + +/* + * DPLMSG_SETPROPERTYRESPONSE + * Standard message returned by a lobby to confirm a + * DPLMSG_SETPROPERTY message. + */ +typedef struct _DPLMSG_SETPROPERTYRESPONSE +{ + DWORD dwType; // Message type + DWORD dwRequestID; // Request ID + GUID guidPlayer; // Player GUID + GUID guidPropertyTag; // Property GUID + HRESULT hr; // Return Code +} DPLMSG_SETPROPERTYRESPONSE, FAR *LPDPLMSG_SETPROPERTYRESPONSE; + +/* + * DPLMSG_GETPROPERTY + * Standard message sent by an application to a lobby to request + * the current value of a property + */ +typedef struct _DPLMSG_GETPROPERTY +{ + DWORD dwType; // Message type + DWORD dwRequestID; // Request ID + GUID guidPlayer; // Player GUID + GUID guidPropertyTag; // Property GUID +} DPLMSG_GETPROPERTY, FAR *LPDPLMSG_GETPROPERTY; + +/* + * DPLMSG_GETPROPERTYRESPONSE + * Standard message returned by a lobby in response to a + * DPLMSG_GETPROPERTY message. + */ +typedef struct _DPLMSG_GETPROPERTYRESPONSE +{ + DWORD dwType; // Message type + DWORD dwRequestID; // Request ID + GUID guidPlayer; // Player GUID + GUID guidPropertyTag; // Property GUID + HRESULT hr; // Return Code + DWORD dwDataSize; // Size of data + DWORD dwPropertyData[1]; // Buffer containing data +} DPLMSG_GETPROPERTYRESPONSE, FAR *LPDPLMSG_GETPROPERTYRESPONSE; + +/* + * DPLMSG_NEWSESSIONHOST + * Standard message returned by a lobby in response to a + * the session host migrating to a new client + */ +typedef struct _DPLMSG_NEWSESSIONHOST +{ + DWORD dwType; // Message type + GUID guidInstance; // GUID Instance of the session +} DPLMSG_NEWSESSIONHOST, FAR *LPDPLMSG_NEWSESSIONHOST; + + +/****************************************** + * + * 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. + */ +#define DPLSYS_CONNECTIONSETTINGSREAD 0x00000001 + +/* + * The application's call to DirectPlayConnect failed + */ +#define DPLSYS_DPLAYCONNECTFAILED 0x00000002 + +/* + * The application has created a DirectPlay session. + */ +#define DPLSYS_DPLAYCONNECTSUCCEEDED 0x00000003 + +/* + * The application has terminated. + */ +#define DPLSYS_APPTERMINATED 0x00000004 + +/* + * The message is a DPLMSG_SETPROPERTY message. + */ +#define DPLSYS_SETPROPERTY 0x00000005 + +/* + * The message is a DPLMSG_SETPROPERTYRESPONSE message. + */ +#define DPLSYS_SETPROPERTYRESPONSE 0x00000006 + +/* + * The message is a DPLMSG_GETPROPERTY message. + */ +#define DPLSYS_GETPROPERTY 0x00000007 + +/* + * The message is a DPLMSG_GETPROPERTYRESPONSE message. + */ +#define DPLSYS_GETPROPERTYRESPONSE 0x00000008 + +/* + * The message is a DPLMSG_NEWSESSIONHOST message. + */ +#define DPLSYS_NEWSESSIONHOST 0x00000009 + +/* + * New connection settings are available. + */ +#define DPLSYS_NEWCONNECTIONSETTINGS 0x0000000A + +/* + * The Lobby Client has released the DirectPlayLobby Interface + */ +#define DPLSYS_LOBBYCLIENTRELEASE 0x0000000B + +/**************************************************************************** + * + * 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} +DEFINE_GUID(DPLPROPERTY_MessagesSupported, +0x762ccda1, 0xd916, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67); + +/* + * 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} +DEFINE_GUID(DPLPROPERTY_LobbyGuid, +0xf56920a0, 0xd218, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67); + +/* + * 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} +DEFINE_GUID(DPLPROPERTY_PlayerGuid, +0xb4319322, 0xd20d, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67); + +/* + * DPLDATA_PLAYERGUID + * + * Data structure to hold the GUID of the player and player creation flags + * from the lobby. + */ +typedef struct _DPLDATA_PLAYERGUID +{ + GUID guidPlayer; + DWORD dwPlayerFlags; +} DPLDATA_PLAYERGUID, FAR *LPDPLDATA_PLAYERGUID; + +/* + * 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} +DEFINE_GUID(DPLPROPERTY_PlayerScore, +0x48784000, 0xd219, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67); + +/* + * 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. + */ +typedef struct _DPLDATA_PLAYERSCORE +{ + DWORD dwScoreCount; + LONG Score[1]; +} DPLDATA_PLAYERSCORE, FAR *LPDPLDATA_PLAYERSCORE; + +/**************************************************************************** + * + * 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 + */ +typedef struct _DPADDRESS +{ + GUID guidDataType; + DWORD dwDataSize; +} DPADDRESS; + +typedef DPADDRESS FAR *LPDPADDRESS; + +/* + * DPAID_TotalSize + * + * Chunk is a DWORD containing size of entire DPADDRESS structure + */ + +// {1318F560-912C-11d0-9DAA-00A0C90A43CB} +DEFINE_GUID(DPAID_TotalSize, +0x1318f560, 0x912c, 0x11d0, 0x9d, 0xaa, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb); + +/* + * 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} +DEFINE_GUID(DPAID_ServiceProvider, +0x7d916c0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/* + * 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} +DEFINE_GUID(DPAID_LobbyProvider, +0x59b95640, 0x9667, 0x11d0, 0xa7, 0x7d, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); + +/* + * 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} +DEFINE_GUID(DPAID_Phone, +0x78ec89a0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +// {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E} +DEFINE_GUID(DPAID_PhoneW, +0xba5a7a70, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/* + * 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} +DEFINE_GUID(DPAID_Modem, +0xf6dcc200, 0xa2fe, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +// {01FD92E0-A2FF-11d0-9C4F-00A0C905425E} +DEFINE_GUID(DPAID_ModemW, +0x1fd92e0, 0xa2ff, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/* + * 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} +DEFINE_GUID(DPAID_INet, +0xc4a54da0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +// {E63232A0-9DBF-11d0-9CC1-00A0C905425E} +DEFINE_GUID(DPAID_INetW, +0xe63232a0, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/* + * DPAID_InetPort + * + * Chunk is the port number used for creating the apps TCP and UDP sockets. + * WORD value (i.e. 47624). + */ + +// {E4524541-8EA5-11d1-8A96-006097B01411} +DEFINE_GUID(DPAID_INetPort, +0xe4524541, 0x8ea5, 0x11d1, 0x8a, 0x96, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +#ifdef BIGMESSAGEDEFENSE +#endif + +/* + * 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. + */ + +#define DPCPA_NOFLOW 0 // no flow control +#define DPCPA_XONXOFFFLOW 1 // software flow control +#define DPCPA_RTSFLOW 2 // hardware flow control with RTS +#define DPCPA_DTRFLOW 3 // hardware flow control with DTR +#define DPCPA_RTSDTRFLOW 4 // hardware flow control with RTS and DTR + +typedef struct _DPCOMPORTADDRESS +{ + DWORD dwComPort; // COM port to use (1-4) + DWORD dwBaudRate; // baud rate (100-256k) + DWORD dwStopBits; // no. stop bits (1-2) + DWORD dwParity; // parity (none, odd, even, mark) + DWORD dwFlowControl; // flow control (none, xon/xoff, rts, dtr) +} DPCOMPORTADDRESS; + +typedef DPCOMPORTADDRESS FAR *LPDPCOMPORTADDRESS; + +/* + * DPAID_ComPort + * + * Chunk contains a DPCOMPORTADDRESS structure defining the serial port. + */ + +// {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E} +DEFINE_GUID(DPAID_ComPort, +0xf2f0ce00, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/**************************************************************************** + * + * dplobby 1.0 obsolete definitions + * Included for compatibility only. + * + ****************************************************************************/ +#define DPLAD_SYSTEM DPLMSG_SYSTEM + + +#ifdef __cplusplus +}; +#endif /* __cplusplus */ + +#pragma warning(default:4201) + +#endif /* __DPLOBBY_INCLUDED__ */ diff --git a/src/OpenSHC/DirectPlay/CancelMessage.hpp b/src/OpenSHC/DirectPlay/CancelMessage.hpp deleted file mode 100644 index 0ae14418..00000000 --- a/src/OpenSHC/DirectPlay/CancelMessage.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/CancelMessage.hpp' -*/ - -#pragma once - -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - typedef HRESULT(__stdcall CancelMessage)(void*, DWORD, DWORD); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/Close.hpp b/src/OpenSHC/DirectPlay/Close.hpp deleted file mode 100644 index a19154a8..00000000 --- a/src/OpenSHC/DirectPlay/Close.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/Close.hpp' -*/ - -#pragma once - -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - typedef HRESULT(__stdcall Close)(void*); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/CreatePlayer.hpp b/src/OpenSHC/DirectPlay/CreatePlayer.hpp deleted file mode 100644 index 3a6da7c6..00000000 --- a/src/OpenSHC/DirectPlay/CreatePlayer.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/CreatePlayer.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/DPNAME.hpp" -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::DPNAME; - - typedef HRESULT(__stdcall CreatePlayer)(void*, undefined4, DPNAME*, HANDLE, LPVOID, DWORD, DWORD); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/DPNAME.hpp b/src/OpenSHC/DirectPlay/DPNAME.hpp deleted file mode 100644 index 8e5b566c..00000000 --- a/src/OpenSHC/DirectPlay/DPNAME.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/DPNAME.hpp' -*/ - -#pragma once - -#include "WinDef.h" -#include "winnt.h" - -namespace OpenSHC { -namespace DirectPlay { - -#pragma pack(push, 1) - // SIZE: 0x00000010 - typedef struct DPNAME { - - DWORD dwSize; // 0x00000000 length: 4 - DWORD dwFlags; // 0x00000004 length: 4 - LPWSTR lpszShortName; // 0x00000008 length: 4 - LPWSTR lpszLongName; // 0x0000000C length: 4 - - } DPNAME; -#pragma pack(pop) - - static_assert_cpp98_obj(sizeof(DPNAME) == 16, DPNAME); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/DPSESSIONDESC2.hpp b/src/OpenSHC/DirectPlay/DPSESSIONDESC2.hpp deleted file mode 100644 index f08ef9bd..00000000 --- a/src/OpenSHC/DirectPlay/DPSESSIONDESC2.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/DPSESSIONDESC2.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/DPSESSION_EnumInt.hpp" -#include "WinDef.h" -#include "basetsd.h" -#include "guiddef.h" -#include "winnt.h" - -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::DPSESSION_EnumInt; - -#pragma pack(push, 1) - // SIZE: 0x00000050 - typedef struct DPSESSIONDESC2 { - - DWORD dwSize; // 0x00000000 length: 4 - DPSESSION_EnumInt dwFlags; // 0x00000004 length: 4 - GUID guidInstance; // 0x00000008 length: 16 - GUID guidApplication; // 0x00000018 length: 16 - DWORD dwMaxPlayers; // 0x00000028 length: 4 - DWORD dwCurrentPlayers; // 0x0000002C length: 4 - LPWSTR lpszSessionName; // 0x00000030 length: 4 - LPWSTR lpszPassword; // 0x00000034 length: 4 - DWORD_PTR dwReserved1; // 0x00000038 length: 4 - DWORD_PTR dwReserved2; // 0x0000003C length: 4 - DWORD_PTR dwUser1; // 0x00000040 length: 4 - DWORD_PTR dwUser2; // 0x00000044 length: 4 - DWORD_PTR dwUser3; // 0x00000048 length: 4 - DWORD_PTR dwUser4; // 0x0000004C length: 4 - - } DPSESSIONDESC2; -#pragma pack(pop) - - static_assert_cpp98_obj(sizeof(DPSESSIONDESC2) == 80, DPSESSIONDESC2); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/DestroyPlayer.hpp b/src/OpenSHC/DirectPlay/DestroyPlayer.hpp deleted file mode 100644 index a55e1fc6..00000000 --- a/src/OpenSHC/DirectPlay/DestroyPlayer.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/DestroyPlayer.hpp' -*/ - -#pragma once - -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - typedef HRESULT(__stdcall DestroyPlayer)(void*, DWORD); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/EnumConnections.hpp b/src/OpenSHC/DirectPlay/EnumConnections.hpp deleted file mode 100644 index 80c067d4..00000000 --- a/src/OpenSHC/DirectPlay/EnumConnections.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/EnumConnections.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/EnumConnectionsCallback.hpp" -#include "OpenSHC/DirectPlay/IDirectPlay4A.hpp" -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::EnumConnectionsCallback; - using OpenSHC::DirectPlay::IDirectPlay4A; - - typedef HRESULT(__stdcall EnumConnections)(IDirectPlay4A*, LPCGUID, EnumConnectionsCallback*, LPVOID, DWORD); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/EnumConnectionsCallback.hpp b/src/OpenSHC/DirectPlay/EnumConnectionsCallback.hpp deleted file mode 100644 index de769ccc..00000000 --- a/src/OpenSHC/DirectPlay/EnumConnectionsCallback.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/EnumConnectionsCallback.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/DPNAME.hpp" -#include "WinDef.h" -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::DPNAME; - - typedef BOOL(__stdcall EnumConnectionsCallback)(LPCGUID, LPVOID, DWORD, DPNAME*, DWORD, LPVOID); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/EnumSessions.hpp b/src/OpenSHC/DirectPlay/EnumSessions.hpp deleted file mode 100644 index 62d2216b..00000000 --- a/src/OpenSHC/DirectPlay/EnumSessions.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/EnumSessions.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/EnumSessionsFlagsEnumInt.hpp" -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::EnumSessionsFlagsEnumInt; - - typedef HRESULT(__stdcall EnumSessions)(void*, void*, DWORD, undefined4, LPVOID, EnumSessionsFlagsEnumInt); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/GetPlayerAddress.hpp b/src/OpenSHC/DirectPlay/GetPlayerAddress.hpp deleted file mode 100644 index 1e4c65b9..00000000 --- a/src/OpenSHC/DirectPlay/GetPlayerAddress.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/GetPlayerAddress.hpp' -*/ - -#pragma once - -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - typedef HRESULT(__stdcall GetPlayerAddress)(void*, undefined4, LPVOID, LPDWORD); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/IDirectPlay4A.hpp b/src/OpenSHC/DirectPlay/IDirectPlay4A.hpp deleted file mode 100644 index 3a100591..00000000 --- a/src/OpenSHC/DirectPlay/IDirectPlay4A.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/IDirectPlay4A.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/CancelMessage.hpp" -#include "OpenSHC/DirectPlay/Close.hpp" -#include "OpenSHC/DirectPlay/CreatePlayer.hpp" -#include "OpenSHC/DirectPlay/DestroyPlayer.hpp" -#include "OpenSHC/DirectPlay/EnumConnections.hpp" -#include "OpenSHC/DirectPlay/EnumSessions.hpp" -#include "OpenSHC/DirectPlay/GetPlayerAddress.hpp" -#include "OpenSHC/DirectPlay/Open.hpp" -#include "OpenSHC/DirectPlay/QueryInterface.hpp" -#include "OpenSHC/DirectPlay/Receive.hpp" -#include "OpenSHC/DirectPlay/Release.hpp" -#include "OpenSHC/DirectPlay/SendEx.hpp" -#include "OpenSHC/DirectPlay/SetSessionDesc.hpp" -#include "OpenSHC/DirectPlay/lobby/InitializeConnection.hpp" - -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::CancelMessage; - using OpenSHC::DirectPlay::Close; - using OpenSHC::DirectPlay::CreatePlayer; - using OpenSHC::DirectPlay::DestroyPlayer; - using OpenSHC::DirectPlay::EnumConnections; - using OpenSHC::DirectPlay::EnumSessions; - using OpenSHC::DirectPlay::GetPlayerAddress; - using OpenSHC::DirectPlay::Open; - using OpenSHC::DirectPlay::QueryInterface; - using OpenSHC::DirectPlay::Receive; - using OpenSHC::DirectPlay::Release; - using OpenSHC::DirectPlay::SendEx; - using OpenSHC::DirectPlay::SetSessionDesc; - using OpenSHC::DirectPlay::lobby::InitializeConnection; - -#pragma pack(push, 1) - // SIZE: 0x000000D4 - typedef struct IDirectPlay4A { - - QueryInterface* QueryInterface; // 0x00000000 length: 4 - undefined1 padding_0x4[4]; // 0x00000004 length: 4 - Release* Release; // 0x00000008 length: 4 - undefined1 padding_0xc[4]; // 0x0000000C length: 4 - Close* Close; // 0x00000010 length: 4 - undefined1 padding_0x14[4]; // 0x00000014 length: 4 - CreatePlayer* CreatePlayer; // 0x00000018 length: 4 - undefined1 padding_0x1c[8]; // 0x0000001C length: 8 - DestroyPlayer* DestroyPlayer; // 0x00000024 length: 4 - undefined1 padding_0x28[12]; // 0x00000028 length: 12 - EnumSessions* EnumSessions; // 0x00000034 length: 4 - undefined1 padding_0x38[16]; // 0x00000038 length: 16 - GetPlayerAddress* GetPlayerAddress; // 0x00000048 length: 4 - undefined1 padding_0x4c[20]; // 0x0000004C length: 20 - Open* Open; // 0x00000060 length: 4 - Receive* Receive; // 0x00000064 length: 4 - undefined1 padding_0x68[20]; // 0x00000068 length: 20 - SetSessionDesc* SetSessionDesc; // 0x0000007C length: 4 - undefined1 padding_0x80[12]; // 0x00000080 length: 12 - EnumConnections* EnumConnections; // 0x0000008C length: 4 - undefined1 padding_0x90[8]; // 0x00000090 length: 8 - InitializeConnection* InitializeConnection; // 0x00000098 length: 4 - undefined1 padding_0x9c[40]; // 0x0000009C length: 40 - SendEx* SendEx; // 0x000000C4 length: 4 - undefined1 padding_0xc8[4]; // 0x000000C8 length: 4 - CancelMessage* CancelMessage; // 0x000000CC length: 4 - undefined1 padding_0xd0[4]; // 0x000000D0 length: 4 - - } IDirectPlay4A; -#pragma pack(pop) - - static_assert_cpp98_obj(sizeof(IDirectPlay4A) == 212, IDirectPlay4A); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/Open.hpp b/src/OpenSHC/DirectPlay/Open.hpp deleted file mode 100644 index b31ff46d..00000000 --- a/src/OpenSHC/DirectPlay/Open.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/Open.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/OpenFlagsEnumInt.hpp" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::OpenFlagsEnumInt; - - typedef HRESULT(__stdcall Open)(void*, void*, OpenFlagsEnumInt); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/QueryInterface.hpp b/src/OpenSHC/DirectPlay/QueryInterface.hpp deleted file mode 100644 index 8759cb51..00000000 --- a/src/OpenSHC/DirectPlay/QueryInterface.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/QueryInterface.hpp' -*/ - -#pragma once - -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - typedef HRESULT(__stdcall QueryInterface)(void*, undefined4, LPVOID*); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/Receive.hpp b/src/OpenSHC/DirectPlay/Receive.hpp deleted file mode 100644 index f8542533..00000000 --- a/src/OpenSHC/DirectPlay/Receive.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/Receive.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/DPRECEIVE_EnumInt.hpp" -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::DPRECEIVE_EnumInt; - - typedef HRESULT(__stdcall Receive)(void*, undefined4, undefined4, DPRECEIVE_EnumInt, LPVOID, LPDWORD); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/Release.hpp b/src/OpenSHC/DirectPlay/Release.hpp deleted file mode 100644 index 44aa72a5..00000000 --- a/src/OpenSHC/DirectPlay/Release.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/Release.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/IDirectPlay4A.hpp" -#include "wtypes.h" -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::IDirectPlay4A; - - typedef ULONG(__stdcall Release)(IDirectPlay4A*); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/SendEx.hpp b/src/OpenSHC/DirectPlay/SendEx.hpp deleted file mode 100644 index 021ac80d..00000000 --- a/src/OpenSHC/DirectPlay/SendEx.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/SendEx.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/DPSEND_EnumInt.hpp" -#include "WinDef.h" -#include "basetsd.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::DPSEND_EnumInt; - - typedef HRESULT(__stdcall SendEx)( - void*, undefined4, undefined4, DPSEND_EnumInt, LPVOID, DWORD, DWORD, DWORD, LPVOID, DWORD_PTR*); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/SetSessionDesc.hpp b/src/OpenSHC/DirectPlay/SetSessionDesc.hpp deleted file mode 100644 index 8e9de61a..00000000 --- a/src/OpenSHC/DirectPlay/SetSessionDesc.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/SetSessionDesc.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/DPSESSIONDESC2.hpp" -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - - using OpenSHC::DirectPlay::DPSESSIONDESC2; - - typedef HRESULT(__stdcall SetSessionDesc)(void*, DPSESSIONDESC2*, DWORD); -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/lobby/CreateCompoundAddress.hpp b/src/OpenSHC/DirectPlay/lobby/CreateCompoundAddress.hpp deleted file mode 100644 index 0dff8f90..00000000 --- a/src/OpenSHC/DirectPlay/lobby/CreateCompoundAddress.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/lobby/CreateCompoundAddress.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/DPERRInt.hpp" -#include "WinDef.h" -namespace OpenSHC { -namespace DirectPlay { - namespace lobby { - - using OpenSHC::DirectPlay::DPERRInt; - - typedef DPERRInt(__stdcall CreateCompoundAddress)(void*, undefined4, DWORD, LPVOID, LPDWORD); - } // namespace lobby -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/lobby/EnumAddress.hpp b/src/OpenSHC/DirectPlay/lobby/EnumAddress.hpp deleted file mode 100644 index 698392e9..00000000 --- a/src/OpenSHC/DirectPlay/lobby/EnumAddress.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/lobby/EnumAddress.hpp' -*/ - -#pragma once - -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - namespace lobby { - - typedef HRESULT(__stdcall EnumAddress)(void*, void*, LPCVOID, DWORD, LPVOID); - } // namespace lobby -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/lobby/IDirectPlayLobby3.hpp b/src/OpenSHC/DirectPlay/lobby/IDirectPlayLobby3.hpp deleted file mode 100644 index 7a818298..00000000 --- a/src/OpenSHC/DirectPlay/lobby/IDirectPlayLobby3.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/lobby/IDirectPlayLobby3.hpp' -*/ - -#pragma once - -#include "OpenSHC/DirectPlay/lobby/CreateCompoundAddress.hpp" -#include "OpenSHC/DirectPlay/lobby/EnumAddress.hpp" -#include "ddraw.h" - -namespace OpenSHC { -namespace DirectPlay { - namespace lobby { - - using OpenSHC::DirectPlay::lobby::CreateCompoundAddress; - using OpenSHC::DirectPlay::lobby::EnumAddress; - -#pragma pack(push, 1) - // SIZE: 0x0000004C - typedef struct IDirectPlayLobby3 { - - undefined1 padding_0x0[8]; // 0x00000000 length: 8 - Release* Release; // 0x00000008 length: 4 - undefined1 padding_0xc[8]; // 0x0000000C length: 8 - EnumAddress* EnumAddress; // 0x00000014 length: 4 - undefined1 padding_0x18[32]; // 0x00000018 length: 32 - CreateCompoundAddress* CreateCompoundAddress; // 0x00000038 length: 4 - undefined1 padding_0x3c[16]; // 0x0000003C length: 16 - - } IDirectPlayLobby3; -#pragma pack(pop) - - static_assert_cpp98_obj(sizeof(IDirectPlayLobby3) == 76, IDirectPlayLobby3); - } // namespace lobby -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/lobby/InitializeConnection.hpp b/src/OpenSHC/DirectPlay/lobby/InitializeConnection.hpp deleted file mode 100644 index cd2d01d5..00000000 --- a/src/OpenSHC/DirectPlay/lobby/InitializeConnection.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/lobby/InitializeConnection.hpp' -*/ - -#pragma once - -#include "WinDef.h" -#include "winnt.h" -namespace OpenSHC { -namespace DirectPlay { - namespace lobby { - - typedef HRESULT(__stdcall InitializeConnection)(void*, LPVOID, DWORD); - } // namespace lobby -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/DirectPlay/lobby/Release.hpp b/src/OpenSHC/DirectPlay/lobby/Release.hpp deleted file mode 100644 index 61d77571..00000000 --- a/src/OpenSHC/DirectPlay/lobby/Release.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/** - THIS FILE IS AUTO GENERATED - Communicate changes to the dev team (e.g. via a Pull Request). - Changes get lost otherwise. - - path: 'OpenSHC/DirectPlay/lobby/Release.hpp' -*/ - -#pragma once - -#include "wtypes.h" -namespace OpenSHC { -namespace DirectPlay { - namespace lobby { - - typedef ULONG(__stdcall Release)(void*); - } // namespace lobby -} // namespace DirectPlay -} // namespace OpenSHC diff --git a/src/OpenSHC/Global.func.hpp b/src/OpenSHC/Global.func.hpp index 7ea58a8b..f24f4257 100644 --- a/src/OpenSHC/Global.func.hpp +++ b/src/OpenSHC/Global.func.hpp @@ -9,8 +9,6 @@ #pragma once #include "OpenSHC/AI/AIVUnitTypeInt.hpp" -#include "OpenSHC/DirectPlay/DPNAME.hpp" -#include "OpenSHC/DirectPlay/DPSESSIONDESC2.hpp" #include "OpenSHC/Game/Resources/ResourceTypeInt.hpp" #include "OpenSHC/Global.hpp" #include "OpenSHC/Map/Buildings/BuildingTypeInt.hpp" @@ -25,13 +23,12 @@ #include "WinDef.h" #include "crtdefs.h" #include "ddraw.h" +#include "dplay.h" #include "winnt.h" namespace OpenSHC { namespace Global_Func { using OpenSHC::AI::AIVUnitTypeInt; - using OpenSHC::DirectPlay::DPNAME; - using OpenSHC::DirectPlay::DPSESSIONDESC2; using OpenSHC::Game::Resources::ResourceTypeInt; using OpenSHC::Map::Buildings::BuildingTypeInt; using OpenSHC::Map::Buildings::BuildingTypeShort; diff --git a/src/OpenSHC/Global.hpp b/src/OpenSHC/Global.hpp index bfb2eb87..dd2c77cc 100644 --- a/src/OpenSHC/Global.hpp +++ b/src/OpenSHC/Global.hpp @@ -9,8 +9,6 @@ #pragma once #include "OpenSHC/AI/AIVUnitTypeInt.hpp" -#include "OpenSHC/DirectPlay/DPNAME.hpp" -#include "OpenSHC/DirectPlay/DPSESSIONDESC2.hpp" #include "OpenSHC/Game/Resources/ResourceTypeInt.hpp" #include "OpenSHC/Map/Buildings/BuildingTypeInt.hpp" #include "OpenSHC/Map/Buildings/BuildingTypeShort.hpp" @@ -24,13 +22,12 @@ #include "WinDef.h" #include "crtdefs.h" #include "ddraw.h" +#include "dplay.h" #include "winnt.h" namespace OpenSHC { namespace Global { using OpenSHC::AI::AIVUnitTypeInt; - using OpenSHC::DirectPlay::DPNAME; - using OpenSHC::DirectPlay::DPSESSIONDESC2; using OpenSHC::Game::Resources::ResourceTypeInt; using OpenSHC::Map::Buildings::BuildingTypeInt; using OpenSHC::Map::Buildings::BuildingTypeShort; diff --git a/src/OpenSHC/Globals/DPLAY_InterfacePointer.hpp b/src/OpenSHC/Globals/DPLAY_InterfacePointer.hpp index 414626e7..920be681 100644 --- a/src/OpenSHC/Globals/DPLAY_InterfacePointer.hpp +++ b/src/OpenSHC/Globals/DPLAY_InterfacePointer.hpp @@ -8,10 +8,8 @@ #pragma once -#include "OpenSHC/DirectPlay/IDirectPlay4A.hpp" +#include "dplay.h" namespace OpenSHC { -using OpenSHC::DirectPlay::IDirectPlay4A; - MACRO_STRUCT_RESOLVER(IDirectPlay4A**, false, Address::SHC_3BB0A8C1_0x00DF3D18) DPLAY_InterfacePointer; } // namespace OpenSHC diff --git a/src/OpenSHC/Synchrony/GameSynchronyState.hpp b/src/OpenSHC/Synchrony/GameSynchronyState.hpp index cd0969b9..6f64989a 100644 --- a/src/OpenSHC/Synchrony/GameSynchronyState.hpp +++ b/src/OpenSHC/Synchrony/GameSynchronyState.hpp @@ -14,9 +14,6 @@ #include "OpenSHC/Commands/GameCommandSchedulingInt.hpp" #include "OpenSHC/Commands/GameCommandTypeInt.hpp" #include "OpenSHC/DirectPlay/DPERRInt.hpp" -#include "OpenSHC/DirectPlay/DPNAME.hpp" -#include "OpenSHC/DirectPlay/IDirectPlay4A.hpp" -#include "OpenSHC/DirectPlay/lobby/IDirectPlayLobby3.hpp" #include "OpenSHC/Game/GameModeInt.hpp" #include "OpenSHC/Game/Skirmish/SkirmishStatistics.hpp" #include "OpenSHC/Synchrony/HashContainer.hpp" @@ -27,8 +24,11 @@ #include "OpenSHC/UI/Enums/MenuModalTypeInt.hpp" #include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" #include "WinDef.h" +#include "WinSock.h" #include "basetsd.h" #include "crtdefs.h" +#include "dplay.h" +#include "dplobby.h" #include "guiddef.h" #include "inaddr.h" #include "mbstring.h" @@ -43,9 +43,6 @@ namespace Synchrony { using OpenSHC::Commands::GameCommandSchedulingInt; using OpenSHC::Commands::GameCommandTypeInt; using OpenSHC::DirectPlay::DPERRInt; - using OpenSHC::DirectPlay::DPNAME; - using OpenSHC::DirectPlay::IDirectPlay4A; - using OpenSHC::DirectPlay::lobby::IDirectPlayLobby3; using OpenSHC::Game::GameModeInt; using OpenSHC::Game::Skirmish::SkirmishStatistics; using OpenSHC::Synchrony::HashContainer; diff --git a/src/precomp/addresses-SHC-3BB0A8C1.hpp b/src/precomp/addresses-SHC-3BB0A8C1.hpp index 38cd0803..dcff0ff8 100644 --- a/src/precomp/addresses-SHC-3BB0A8C1.hpp +++ b/src/precomp/addresses-SHC-3BB0A8C1.hpp @@ -94285,7 +94285,7 @@ enum { SHC_3BB0A8C1_0x00DF3878 = 0x00DF3878, // label: DPLAY_InterfacePointer // location: - // type: OpenSHC/DirectPlay/IDirectPlay4A * * + // type: OpenSHC/DirectPlay/dplay/IDirectPlay4A * * SHC_3BB0A8C1_0x00DF3D18 = 0x00DF3D18, // label: DPLAY_CurrentSessionGUID // location: