От:
tarakan
Дата: 28.10.03 13:28
Оценка:
nakidal prostenkuiu progu ,posmatret kak tapi zvonit.
(smotrite nize)
odnako pri linkovke esti oshibki
callc.obj : error LNK2001: unresolved external symbol _IID_ITMediaSupport
callc.obj : error LNK2001: unresolved external symbol _TAPIMEDIATYPE_AudioOut
callc.obj : error LNK2001: unresolved external symbol _TAPIMEDIATYPE_AudioIn
callc.obj : error LNK2001: unresolved external symbol _CLSID_TAPI
callc.obj : error LNK2001: unresolved external symbol _IID_ITTAPI
Debug/callc.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.
tobish chtoto nenahodatsa ssilki na identeficatori interfaisov
poshemu i chto nafdo pomenat "progect settings" ?
-tapi32.lib uze pitalsa vstavlati ,ne poluchaetsa.
-----------------------------------------------------------
#define UNICODE
#include <tapi3.h>
#include <windowsx.h>
ITTAPI * gpTapi;
IEnumAddress *pEnumAddress;
ITAddress *pAddress;
ITMediaSupport *pMediaSupport;
ITBasicCallControl *pBasicCall;
BSTR addresstocall;
char *szBuffer = new char[100];
VARIANT_BOOL bSupport;
LPWSTR psz;
LPWSTR psz2;
void main()
{
//com initialization
CoInitialize(NULL);
//create Tapi object
CoCreateInstance(
CLSID_TAPI,
NULL,
CLSCTX_INPROC_SERVER,
IID_ITTAPI,
(LPVOID *)&gpTapi
);
//tapi initialization
gpTapi->Initialize();
//get the pointer to all adress objects that exist in our computer
gpTapi->_EnumerateAddresses(&pEnumAddress);
//look what media type suported by each adress (using the while),
//if we found adress that support video and audio we break the while and nneded adress stay in pAddress object
StringFromIID(TAPIMEDIATYPE_AudioIn, &psz );
BSTR gbstrAudioIn = SysAllocString( psz );
StringFromIID(TAPIMEDIATYPE_AudioOut, &psz2 );
BSTR gbstrAudioOut = SysAllocString( psz2 );
while(S_OK==pEnumAddress->Next(1,&pAddress,NULL))
{
pAddress->QueryInterface(IID_ITMediaSupport, (void **)&pMediaSupport );
pMediaSupport->QueryMediaType( gbstrAudioIn, &bSupport );
if(bSupport)
{
pMediaSupport->QueryMediaType(
gbstrAudioOut,
&bSupport
);
if (bSupport)
{
break;
}
}
}
szBuffer="054507827";
addresstocall=SysAllocStringByteLen(szBuffer, strlen(szBuffer)+1);
//but SysAllocStringByteLen not convert the string to unicode
pAddress->CreateCall(addresstocall,&pBasicCall);
pBasicCall->Connect(TRUE);
}
--------------------------------------------------------------------------------------------
Пока на собственное сообщение не было ответов, его можно удалить.
Удалить