- Added dplayx LibMain for initialization of all dplayx 'global' data
- Added start for global data manipulation
- TODO list updated
- Added some missing header file definitions
- Added the ansi versions of dplay and dplobby
- Fixed invalid macro for IDirectPlay4
- Cleaned up compiler warnings
- More implementation, bug fixes and critical region protection
diff --git a/include/dplay.h b/include/dplay.h
index 9864555..46cda77 100644
--- a/include/dplay.h
+++ b/include/dplay.h
@@ -384,6 +384,8 @@
DWORD dwFlags,
LPVOID lpContext );
+#define DPESC_TIMEDOUT 0x00000001
+
#include "poppack.h"
/*****************************************************************************
@@ -449,7 +451,7 @@
/*****************************************************************************
- * IDirectPlay2 interface
+ * IDirectPlay2 and IDirectPlay2A interface
*/
#define ICOM_INTERFACE IDirectPlay2
#define IDirectPlay2_METHODS \
@@ -525,7 +527,7 @@
/*****************************************************************************
- * IDirectPlay3 interface
+ * IDirectPlay3 and IDirectPlay3A interface
*/
#define ICOM_INTERFACE IDirectPlay3
#define IDirectPlay3_METHODS \
@@ -602,11 +604,7 @@
#define IDirectPlay3_GetPlayerFlags(p,a,b) ICOM_CALL2(GetPlayerFlags,p,a,b)
/*****************************************************************************
- * IDirectPlay4 interface - this is also known as IDirectPlayX. Apparently people
- * are realizing that declaring all the darn interfaces as IDirectPlay{2,3,...} is
- * just plain dumb. It's now going to be just IDirectPlayX since they're just macros
- * anyways. That's good because I'm tired of typing these entries :)
- * The compiler should catch any problems with invocation of invalid method :)
+ * IDirectPlay4 and IDirectPlay4A interface
*/
#define ICOM_INTERFACE IDirectPlay4
#define IDirectPlay4_METHODS \
@@ -617,11 +615,10 @@
ICOM_METHOD2( HRESULT, CancelMessage, DWORD,, DWORD, ) \
ICOM_METHOD3( HRESULT, CancelPriority, DWORD,, DWORD,, DWORD, )
-#define IDirectPlay4_IMETHODS
+#define IDirectPlay4_IMETHODS \
IDirectPlay3_IMETHODS \
IDirectPlay4_METHODS
ICOM_DEFINE(IDirectPlay4,IDirectPlay3)
-
#undef ICOM_INTERFACE
/*** IUnknown methods ***/
@@ -682,6 +679,7 @@
#define IDirectPlayX_CancelMessage(p,a,b) ICOM_CALL2(CancelMessage,a,b)
#define IDirectPlayX_CancelPriority(p,a,b,c) ICOM_CALL3(CancelPriority,a,b,c)
+
/* For DirectPlay::EnumConnections */
#define DPCONNECTION_DIRECTPLAY 0x00000001
#define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002
diff --git a/include/dplobby.h b/include/dplobby.h
index f0582cc..002e4f7 100644
--- a/include/dplobby.h
+++ b/include/dplobby.h
@@ -34,7 +34,7 @@
typedef struct IDirectPlayLobby3 IDirectPlayLobby3, *LPDIRECTPLAYLOBBY3;
DEFINE_GUID(IID_IDirectPlayLobby3A, 0x2db72491, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
-typedef struct IDirectPlayLobby3A IDirectPlayLobby3A, *LPDIRECTPLAYLOBBY3A;
+typedef struct IDirectPlayLobby3 IDirectPlayLobby3A, *LPDIRECTPLAYLOBBY3A;
/*****************************************************************************
@@ -223,7 +223,7 @@
DEFINE_GUID(DPAID_INetW, 0xe63232a0, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/* DPAID_INetPort {E4524541-8EA5-11d1-8A96-006097B01411}
- * Chunk purpose: Chunk is a port number used for creating TCP and UDP sockets.
+ * Chunk purpose: Chunk is a port number used for creating TCP and UDP sockets. (WORD)
*/
DEFINE_GUID(DPAID_INetPort, 0xe4524541, 0x8ea5, 0x11d1, 0x8a, 0x96, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
@@ -331,8 +331,8 @@
-extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD );
-extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD );
+extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY*, IUnknown*, LPVOID, DWORD );
+extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA*, IUnknown*, LPVOID, DWORD );
@@ -355,7 +355,7 @@
#include "poppack.h"
/*****************************************************************************
- * IDirectPlayLobby interface
+ * IDirectPlayLobby and IDirectPlayLobbyA interface
*/
#define ICOM_INTERFACE IDirectPlayLobby
#define IDirectPlayLobby_METHODS \
@@ -377,7 +377,7 @@
#undef ICOM_INTERFACE
/*****************************************************************************
- * IDirectPlayLobby2 interface
+ * IDirectPlayLobby2 and IDirectPlayLobby2A interface
*/
#define ICOM_INTERFACE IDirectPlayLobby2
#define IDirectPlayLobby2_METHODS \
@@ -389,9 +389,8 @@
#undef ICOM_INTERFACE
/*****************************************************************************
- * IDirectPlayLobby3 interface
+ * IDirectPlayLobby3 and IDirectPlayLobby3A interface
*/
-
#define ICOM_INTERFACE IDirectPlayLobby3
#define IDirectPlayLobby3_METHODS \
ICOM_METHOD4( HRESULT, ConnectEx, DWORD,, REFIID,, LPVOID *,, IUnknown *,) \
@@ -405,11 +404,9 @@
ICOM_DEFINE(IDirectPlayLobby3,IDirectPlayLobby2)
#undef ICOM_INTERFACE
-/*** IUnknown methods ***/
#define IDirectPlayLobby_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirectPlayLobby_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirectPlayLobby_Release(p) ICOM_CALL (Release,p)
-/*** IDirectPlayLobby methods ***/
#define IDirectPlayLobby_Connect(p,a,b,c) ICOM_CALL3(Connect,p,a,b,c)
#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) ICOM_CALL4(ConnectEx,p,a,b,c,d)
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) ICOM_CALL6(CreateAddress,p,a,b,c,d,e,f)