Bernhard Kölbl (@besentv) commented about dlls/windows.media.speech/synthesizer.c:
+static HRESULT synthesizer_options_create( struct synthesizer_options **out ) +{
- struct synthesizer_options *options;
- if (!(options = calloc(1, sizeof(*options)))) return E_OUTOFMEMORY;
- options->ISpeechSynthesizerOptions_iface.lpVtbl = &synthesizer_options_vtbl;
- options->ISpeechSynthesizerOptions2_iface.lpVtbl = &synthesizer_options2_vtbl;
- options->ISpeechSynthesizerOptions3_iface.lpVtbl = &synthesizer_options3_vtbl;
- /* all other values default to 0 or false */
- options->audio_pitch = 1.0;
- options->audio_volume = 1.0;
- options->speaking_rate = 1.0;
- *out = options;
I'd prefer it if you return the IIface pointer here instead of the struct, as these create functions are like class constructors to me. If you need the struct later on just use impl_from_I...
Also this makes the "Created iface ..." trace clearer imo.