Huw Davies (@huw) commented about dlls/mmdevapi/session.c:
static HRESULT WINAPI control_SetDisplayName(IAudioSessionControl2 *iface, const WCHAR *name,
const GUID *session)
const GUID *session_guid)
{ struct audio_session_wrapper *This = impl_from_IAudioSessionControl2(iface);
- FIXME("(%p)->(%p, %s) - stub\n", This, name, debugstr_guid(session));
- return E_NOTIMPL;
- struct audio_session *session = This->session;
- TRACE("(%p)->(%p, %s) - stub\n", This, name, debugstr_guid(session_guid));
- FIXME("Ignoring session_guid\n");
- if (!name)
return HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER);
- session->display_name = duplicate_wstr(name);
You should free any existing `display_name`. I'd also use `wcsdup()` here and use `duplicate_wstr()` only in the getter.