System::initialize failed in DSOUND output type

When FMOD_OUTPUTTYPE is FMOD_OUTPUTTYPE_DSOUND and the value of extradriverdata is 0 System::initialize returns FMOD_OK.
But if I pass the address of CWnd::m_hWnd to extradriverdata(my app based on a MFC application),the return value of System::initialize is FMOD_ERR_OUTPUT_DRIVER_CALL.
How to solve this?

The reason why I want to pass &m_hWnd to extradriverdata is the sound still playing after I minimize the window (I called SetMute when minimize is triggered). And it stuttered for a while after I close the window. There problem didn’t happen in other output type such as WASAPI.
So I guess it could be solved if I pass the &m_hWnd to extradrivardata. But failed.

When creating a IDirectSound we need to call SetCooperativeLevel method which need a HWND parameter.
So how can it initialize successful if extradriverdata is set to 0,but failed with &m_hWnd?
Thanks in advance if someone can explain about this to we.I’m a little puzzled.

I think the issue is that you are using &m_hwnd instead of just passing the m_hwnd directly.

The documentation does say pointer to, so i’ll update that to say cast to instead, apologies for the hassle.