CoCreateInstance: CLSCTX_INPROC ?
Hi guys,
Have been working through numerous tutorials in relation to DX inparticular DirectMusic from Mason McCuskeys Game Audio Programming.
Have hit a snag that I cant see the problem for.
Unhandled exception at 0x76dce1bf in Communicate.exe: 0xC0000005: Access violation writing location 0x00000008
<code>
==============================================================================
CoCreateInstance(CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC, IID_IDirectMusicLoader8, (void**)&m_Loader);
===============================================================================
</code>
It seems that CLSCTX_INPROC is not one of the enumerations at msdn, do any of you guys use it or know of an alternative?
The tutorial says that this is used to ensure the object shares the same address space but surely that is why I am getting this exception?
Quote:Original post by HeWhoDarezYour this pointer is null, and your m_Loader variable is 8 bytes from the start of your class.
Hi guys,
Have been working through numerous tutorials in relation to DX inparticular DirectMusic from Mason McCuskeys Game Audio Programming.
Have hit a snag that I cant see the problem for.
Unhandled exception at 0x76dce1bf in Communicate.exe: 0xC0000005: Access violation writing location 0x00000008
<code>
==============================================================================
CoCreateInstance(CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC, IID_IDirectMusicLoader8, (void**)&m_Loader);
===============================================================================
</code>
It seems that CLSCTX_INPROC is not one of the enumerations at msdn, do any of you guys use it or know of an alternative?
The tutorial says that this is used to ensure the object shares the same address space but surely that is why I am getting this exception?
Look up the call stack to see where the class is allocated, and make sure it's not failing.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement