On Thu, Mar 29, 2012 at 08:52:45AM +0200, Christian Costa wrote:
...midiOutGetDevCapsW(index - 1, &caps, sizeof(caps));
CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth8, (void**)&synth);
IDirectMusicSynth8_GetPortCaps(synth, port_caps);
Maybe I'm pickier than most people, but I like error checking on these sorts of calls. They make it easier to find what is happening when something goes terribly and unexpectedly wrong.
2012/3/29 Andrew Eikum aeikum@codeweavers.com
On Thu, Mar 29, 2012 at 08:52:45AM +0200, Christian Costa wrote:
...midiOutGetDevCapsW(index - 1, &caps, sizeof(caps));
CoCreateInstance(&CLSID_DirectMusicSynth, NULL,
CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth8, (void**)&synth);
IDirectMusicSynth8_GetPortCaps(synth, port_caps);
Maybe I'm pickier than most people, but I like error checking on these sorts of calls. They make it easier to find what is happening when something goes terribly and unexpectedly wrong.
It's the original code. I decided to keep it in this patch and add error checking in the patch that comes just after. I can merge them but I prefer to do things incrementally as much as possible.
On Thu, Mar 29, 2012 at 04:18:20PM +0200, Christian Costa wrote:
It's the original code. I decided to keep it in this patch and add error checking in the patch that comes just after. I can merge them but I prefer to do things incrementally as much as possible.
Ah, sure enough. I missed that patch. Though in [3/5], you're missing assigning hr for _GetPortCaps(). I also think it would be nice to WARN with the result code in the failure case (or TRACE if a failure is expected in some cases). You know, the usual "if(FAILED(hr)){WARN(..., hr); return hr;}" error checking thing.