CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Altos
    Posts
    168

    Tapi 3.0 com problem

    hey guys,
    i am writing an application using COM for dialling a phone num using tapi 3.0. the problem is while using the QueryMediaType interface the first parameter should be TAPIMEDIATYPE_AUDIO etc. but when i use this in my func there is compiler err. after reading Tapi3.h there is no const such as TAPIMEDIATYPE_AUDIO but there are other like TAPIMEDIATYPE_String_AudioOut but if I use them in my code the application crashes. please help me out of this mess.
    herz the code.........
    Code:
    ITTAPI *pTapi;
    	HRESULT hr = CoCreateInstance(CLSID_TAPI, NULL, CLSCTX_INPROC_SERVER,
    		IID_ITTAPI, (LPVOID *)&pTapi);
    	if(SUCCEEDED(hr))
    	{
    		hr = pTapi->Initialize();
    		if(!SUCCEEDED(hr))
    			return 0;
    	}
    	IEnumAddress *pEnumAddress;
    	ITAddress *pAddress;
    	ITMediaSupport *pMediaSupport;
    	pTapi->_EnumerateAddresses(&pEnumAddress);
    	while(S_OK == pEnumAddress->Next(1, &pAddress, NULL))
    	{
    		VARIANT_BOOL bSupport;
    		pAddress->QueryInterface(IID_ITMediaSupport, (void**)&pMediaSupport);
    		hr = pMediaSupport->QueryMediaType(TAPIMEDIATYPE_AUDIO , &bSupport);
    		
    		if(bSupport)
    		{
    			break;
    		}
    	}
    thanx in advance
    Regards,
    Bandit
    Last edited by Cyber Bandit; May 15th, 2004 at 03:12 PM.
    "I came"
    "I saw"
    "I conquered"

  2. #2
    Join Date
    Jan 2004
    Location
    Altos
    Posts
    168

    Unhappy

    Hey guruz wat hapnd. wat hapnd none have replied to my problem. cud anyone help me out here.
    thanx
    "I came"
    "I saw"
    "I conquered"

  3. #3
    Join Date
    Oct 2004
    Posts
    4

    Re: Tapi 3.0 com problem

    tapi3if.h

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured