Alessandro Pignotti wrote:
On Saturday 24 February 2007 19:31, Stefan Dösinger wrote:
todo_wine ok(memcmp(&sessionDesc.guidInstance,&zeroGuid,16),"Session guid not initialized");
For tests which are known to fail
This version of the patch follows Stefan's advice.
diff --git a/configure.ac b/configure.ac index 672dd78..4ef4e23 100644 --- a/configure.ac +++ b/configure.ac @@ -1587,6 +1587,7 @@ dlls/dnsapi/Makefile dlls/dnsapi/tests/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile +dlls/dplayx/tests/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index f5c630a..475e59c 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -2828,6 +2828,8 @@ static HRESULT WINAPI DP_SecureOpen
This->dp2->bHostInterface = TRUE;
- //Initializing session GUID
- CoCreateGuid(&(lpsd->guidInstance)); hr = DP_SetSessionDesc( This, lpsd, 0, TRUE, bAnsi ); if( FAILED( hr ) ) {
diff --git a/dlls/dplayx/tests/Makefile.in b/dlls/dplayx/tests/Makefile.in new file mode 100644 index 0000000..02007d1 --- /dev/null +++ b/dlls/dplayx/tests/Makefile.in @@ -0,0 +1,14 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = dplayx.dll +IMPORTS = kernel32 ole32 dxguid +EXTRALIBS =
+CTESTS = \
- dplayx.c
+@MAKE_TEST_RULES@
+@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c new file mode 100644 index 0000000..ba96125 --- /dev/null +++ b/dlls/dplayx/tests/dplayx.c @@ -0,0 +1,55 @@ +#include <wine/test.h> +#include <dplay.h>
+BOOL validSP=0;
+BOOL FAR PASCAL EnumConnectionsCallback(LPCGUID lpguidSP, LPVOID lpConnection,
- DWORD dwConnectionSize, LPCDPNAME lpName, DWORD dwFlags,
- LPVOID lpContext)
+{
- if(!memcmp(lpguidSP,&DPSPGUID_TCPIP,16))
- {
//I'm forcing TCP/IP Sevice provider
HRESULT hr=IDirectPlayX_InitializeConnection((LPDIRECTPLAY4)lpContext,lpConnection,0);
todo_wine
{
ok(SUCCEEDED(hr),"It's not possible to initialize TCP/IP service provider\n");
}
if(SUCCEEDED(hr))
validSP=1;
return FALSE;
- }
- return TRUE;
+}
+START_TEST(dplayx) +{
- LPDIRECTPLAY4 pDP = NULL;
- GUID appGuid;
- GUID zeroGuid;
- DPSESSIONDESC2 sessionDesc;
- CoInitialize(NULL);
- CoCreateGuid(&appGuid);
- CoCreateInstance(&CLSID_DirectPlay,NULL, CLSCTX_ALL,
&IID_IDirectPlay4A,(VOID**)&pDP);
- IDirectPlayX_EnumConnections(pDP,&appGuid,EnumConnectionsCallback,
pDP,0);
- if(validSP)
- {
bzero(&sessionDesc,sizeof(DPSESSIONDESC2));
bzero(&zeroGuid,16);
sessionDesc.dwSize=sizeof(DPSESSIONDESC2);
sessionDesc.dwFlags=DPSESSION_CLIENTSERVER;
memcpy(&sessionDesc.guidApplication,&appGuid,16);
sessionDesc.lpszSessionNameA="DPlay conformance test";
sessionDesc.dwMaxPlayers=10;
sessionDesc.dwCurrentPlayers=0;
sessionDesc.guidInstance=CLSID_DirectPlay;
IDirectPlayX_Open(pDP,&sessionDesc,DPOPEN_CREATE);
todo_wine ok(memcmp(&sessionDesc.guidInstance,&zeroGuid,16),"Session guid not initialized");
- }
- IDirectPlayX_Release(pDP);
- CoUninitialize();
+}
Hi,
no clue about dplayx but:
- there are some C++ style comments, please use C-style - there is no copyright/license information
Cheers,
Paul.