Discussion:
COM and TAPI Initialize error
(too old to reply)
Qinglan
2003-07-19 09:19:06 UTC
Permalink
I try to write a MFC programe use TAPI3, and I just write
only the initialize code in the OnInitDialog()
function,but the compiler give me wrong:

MyTest.obj : error LNK2001: unresolved external symbol
_CLSID_TAPI
MyTest.obj : error LNK2001: unresolved external symbol
_IID_ITTAPI


the code is:
if ( FAILED( CoInitialize(NULL) ) )
{
return FALSE;
}

HRESULT hr;
hr = CoCreateInstance(
CLSID_TAPI,
NULL,
CLSCTX_INPROC_SERVER,
IID_ITTAPI,
(LPVOID *)&m_pTapi
);
Thanks, and sorry for my poor English.

Qinglan
Andreas Marschall
2003-07-19 10:16:44 UTC
Permalink
From a makefile of the TAPI3 samples:
EXTRA_LIBS = version.lib ole32.lib oleaut32.lib uuid.lib strmiids.lib
t3iid.lib
Did you add all these LIBs ?

--
Best Regards / Mit freundlichen Grüßen
Andreas Marschall
Post by Qinglan
I try to write a MFC programe use TAPI3, and I just write
only the initialize code in the OnInitDialog()
MyTest.obj : error LNK2001: unresolved external symbol
_CLSID_TAPI
MyTest.obj : error LNK2001: unresolved external symbol
_IID_ITTAPI
if ( FAILED( CoInitialize(NULL) ) )
{
return FALSE;
}
HRESULT hr;
hr = CoCreateInstance(
CLSID_TAPI,
NULL,
CLSCTX_INPROC_SERVER,
IID_ITTAPI,
(LPVOID *)&m_pTapi
);
Thanks, and sorry for my poor English.
Qinglan
Qinglan
2003-07-19 11:08:48 UTC
Permalink
Thank you for your reply.

I add these LIBs and the program compiles ok. Thank you
very much.

But I see the FileTerm sample in the Platform SDK only
includes version.lib ole32.lib oleaut32.lib uuid.lib, it
does'n include t3iid.lib,but this sample compiles ok.
why?
Qinglan
-----Original Message-----
EXTRA_LIBS = version.lib ole32.lib oleaut32.lib uuid.lib
strmiids.lib
t3iid.lib
Did you add all these LIBs ?
--
Best Regards / Mit freundlichen Grüßen
Andreas Marschall
Loading...