Hi All,
I am seeing an exception running 32-bit code using CComActivator::DOCreateInstance. This call causes an access violation when invoking CoCreateInstance to instantiate a device enumerator object in a 32-bit DLL. The same code compiled 64-bit invoking the same enumerator in a 64-bit DLL works perfectly.
IMMDeviceEnumerator* pDeviceEnumerator = NULL;
CoCreateInstance(__uuidof(MMDeviceEnunerator), NULL, CLCTX_INPROC_SERVER, __uuidof(IMMDeviceEnumerator), (LPVOID*)&pDeviceEnumerator);
push 0
push eax
push 1
push 0
push dword ptr [ebp+10h]
mov ecx, ebx
call combase!CComActivator::DOCreateInstance
(3bc.1cf4): Access violation - code c0000005 (first chance)
BTW. The calling convention used in the DLL for all the enumerator methods is STDMETHODCALLTYPE, which is the required calling convention through class inheritance. What am I missing here? Is it a calling convention problem? Any ideas?
Sincerely,
Norman