Releasing IDirectinputdevice interface
-
hi, I have a problem when releasing the IDirectInput8Device interface as below. if (m_lpdirinde8Device) { m_lpdirinde8Device->Unacquire(); m_lpdirinde8Device->Release(); m_lpdirinde8Device = NULL; } But it hangs at the release. This happens only if I create an effect on this device. Can somebody give a hint why release hangs? Thanks Manju
-
hi, I have a problem when releasing the IDirectInput8Device interface as below. if (m_lpdirinde8Device) { m_lpdirinde8Device->Unacquire(); m_lpdirinde8Device->Release(); m_lpdirinde8Device = NULL; } But it hangs at the release. This happens only if I create an effect on this device. Can somebody give a hint why release hangs? Thanks Manju
I don't know exactaly what may have caused the Release to crash from looking at the code you listed, but the last time this happened to me was when my IUnknown:Release was called while there was a pointer still open or a memory buffer that was not closed/freed (be it a string without an end character or a Malloc-ed memory space) before the call to Release. This MAY be the problem, as it what causes a similar problem for me, but there could be other factors, like an improper declaration of the Release in your COM class declaration and so on.