dpnet: Improve Error checking in Get/Set SP

Michael Stefaniuc mstefani at redhat.com
Wed Jan 15 03:47:08 CST 2014

On 01/15/2014 09:44 AM, Stefan Dösinger wrote:
> Hi,
>> +        hr = IDirectPlay8Address_GetSP(localaddr, &guidsp); +
>> ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr);
> For the sake of completion I'd test setting GUID_NULL, IID_IUnknown
> and something nonsensical like IID_IDirectDrawGammaControl (or
> maybe something you have access to without additional headers like
> IID_IDirectPlay8Address).
I nowadays use IID_IClassFactory for the "invalid" IID test. Just to
avoid having to include an other header.

> Some style nitpicks follow. If you end up becoming the de-facto
> maintainer of dplay it's up to you how important they are:
>> +    sprintf(buf, +
>> "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", +
>> guid->Data1, guid->Data2, guid->Data3, +        guid->Data4[0],
>> guid->Data4[1], guid->Data4[2], guid->Data4[3], +
>> guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
> In the d3d code we use 8 space indentations. You may want to follow
> that.
It is double indentation for continuation lines. Or align to the
opening "("; don't know what dplay and related prefer. Probably a mix
of both.

> Also, there's debugstr_guid in wine/debug.h. It seems you're aware
> of that and used your own functions because wine/debug.h doesn't
> work in the tests. Is this correct?
I keep running into the need of debugstr_guid() in tests so I plan to
add it to include/wine/test.h and remove the duplicates. But I'm busy
atm with dmusic and don't want to stop.


More information about the wine-devel mailing list