directx queryinterface
Good day
im trying to create direct x code to read from the soundcard and I'm currently stuck on a linking error
apparently the compiler doesnt like
if( FAILED( hr = g_pDSBCapture->QueryInterface( IID_IDirectSoundNotify, (LPVOID*)&g_pDSNotify ) ) )
for soem reason. The error it gives me is
LINK : error LNK2020: unresolved token (0A000016) IID_IDirectSoundNotify
LINK : fatal error LNK1120: 1 unresolved externals
any help would be greatly appreciated
thanks
i ran inot another problem after i got it to compile
seems CoInitialize() never succeeds
the entire code is here
http://www.noidea128.org/sourcefiles/14294.html
again any help is greatly appreciated.. rewarded even.. perhaps a statue of your likeness made out of the pizza boxes in my room
also could you explain what coinitialize does and why i need it. i have a general idea but the msdn site doesnt explain it well
seems CoInitialize() never succeeds
the entire code is here
http://www.noidea128.org/sourcefiles/14294.html
again any help is greatly appreciated.. rewarded even.. perhaps a statue of your likeness made out of the pizza boxes in my room
also could you explain what coinitialize does and why i need it. i have a general idea but the msdn site doesnt explain it well
CoInitialize sets up the COM datastructures and underlying components. That's basically all you need to remember.
With every CoInitialize, you need to pair it with a CoUninitialize...which I saw you had. :)
I use the newer (and recommended) method of setting up COM.
1. Before the windows.h file, #define _WIN32_DCOM
2. Use CoInitializeEx( NULL, COINIT_MULTITHREADED );
this tends to always work for me just fine..(leave the CoUninitialize as is).
hth
With every CoInitialize, you need to pair it with a CoUninitialize...which I saw you had. :)
I use the newer (and recommended) method of setting up COM.
1. Before the windows.h file, #define _WIN32_DCOM
2. Use CoInitializeEx( NULL, COINIT_MULTITHREADED );
this tends to always work for me just fine..(leave the CoUninitialize as is).
hth
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement