Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CoCreateInstance Fails using LeadTools MultiMedia Com Interface

Status
Not open for further replies.

cdigeek

Programmer
Oct 30, 2004
3
US
Using LeadTools v.13 with VC++ 6.0 sp6 on XP Pro sp1, I am getting E_NOINTERFACE (0x80004002) When I try to create the multimedia capture interface as follows:

hr = CoCreateInstance(CLSID_ltmmCapture, NULL, CLSCTX_INPROC_SERVER, IID_IltmmCapture, (void**) &m_capture);

It used to work. Now it fails in both the debug and release builds. Other third-party COM objects work fine.

I downloaded the latest patches to get the most recent ltmm.h, ltmmuuid.lib and ltmm_n.dll (13.0.0.7). I unregistered the old dll (regsvr32 /u ltmm_n.dll), copied the new dll to \windows\system32 and then registered it (regsvr32 ltmm_n.dll). I searched the entire hard drive to make sure there is only one copy of ltmm.h, ltmmuuid.lib, and ltmm_n.dll. Also, ltmm.lic is in \windows\system32.

The raster imaging dll's work fine, but when it comes time to use the multimedia capture interface it fails.

Any help will be greatly appreciated.
 
as far as I know. you ask for IID_IUnknown first in the call to CoCreateInstance.

....
IUnknown* pUnknown = NULL;

hr = CoCreateInstance(CLSID_ltmmCapture, NULL, CLSCTX_INPROC_SERVER, IID_IUnknown, (void**) &pUnknown);

hr = pUnknown->QueryInterface(IID_xxxxxx, (void**)&m_capture);

pUnknown->Release();
....

s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
You are right. I thought so, too. But the leadtools example shows it using IID_IltmmCapture, which is defined in one of their headers, instead of IID_IUnknown. The strange thing is that it was working.

I posted the same problem in LeadTools moderated Mutlimedia forum but after a week there was no reply. I am hoping I can get a conversation going here with suggestions. Leadtools has a great imaging libaray but the support stinks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top