-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-05-05 08:46, schrieb Alistair Leslie-Hughes:
+static IDirectPlay8Client* client = NULL; ...
- hr = CoCreateInstance(&CLSID_DirectPlay8Client, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Client, (void **)&client);
- ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr);
...
- hr = IDirectPlay8Client_Close(client, 0);
- ok(hr == S_OK, "IDirectPlay8Client_Close failed with %x\n", hr);
Please avoid such dependencies between different tests. If creating and releasing the client is something that every test has to do you can add helper functions for this task.
- for (i=0;i<items;i++)
- {
trace("Found Service Provider: %s\n", wine_dbgstr_w(serv_prov_info->pwszName));
trace("Found guid: %s\n", wine_dbgstr_guid(&serv_prov_info->guid));
serv_prov_info++;
- }
- serv_prov_info -= items; /* set pointer back */
- ok(HeapFree(GetProcessHeap(), 0, serv_prov_info), "Failed freeing server provider info\n");
You could use serv_prov_info as an array instead of doing the pointer arithmentic twice. E.g.
trace("Found guid: %s\n", wine_dbgstr_guid(&serv_prov_info[i].guid));
- hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL, &async, 0);
- todo_wine ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumServiceProviders failed with 0x%08x\n", hr);
- todo_wine ok(async, "No Handle returned\n");
- hr = IDirectPlay8Client_CancelAsyncOperation(client, async, 0);
- ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr);
Are you sure that this always returns DPNSUCCESS_PENDING? Couldn't it also return a result instantly? Overall I don't see the point in this test at the moment. As it is now it doesn't say much. This is just an opinion though, I'll leave the decision up to you.
- todo_wine ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %d\n", caps.dwMaxEnumPayloadSize);
Out of curiosity, do you have any idea where this value comes from?