Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. TAPI , COM

TAPI , COM

Scheduled Pinned Locked Moved C / C++ / MFC
comhelpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    asdf1753
    wrote on last edited by
    #1

    Dear Friends, I try to work with TAPI3.0 that is COM based, so in create an COM object it returns "CoCreateInstance on TAPI failed" ITTAPI *TObj; HRESULT hr; hr = CoCreateInstance( CLSID_TAPI, NULL, CLSCTX_INPROC_SERVER, IID_ITTAPI, (LPVOID *)&TObj ); if ( FAILED(hr) ) { MessageBox("CoCreateInstance on TAPI failed"); } is there any one help me ?

    Y 1 Reply Last reply
    0
    • A asdf1753

      Dear Friends, I try to work with TAPI3.0 that is COM based, so in create an COM object it returns "CoCreateInstance on TAPI failed" ITTAPI *TObj; HRESULT hr; hr = CoCreateInstance( CLSID_TAPI, NULL, CLSCTX_INPROC_SERVER, IID_ITTAPI, (LPVOID *)&TObj ); if ( FAILED(hr) ) { MessageBox("CoCreateInstance on TAPI failed"); } is there any one help me ?

      Y Offline
      Y Offline
      YaronNir
      wrote on last edited by
      #2

      What is the hr result when CoCreateInstance Fails? look the result in the error lookup. hope this helps Yaron Ask not what your application can do for you, Ask what you can do for your application

      A 1 Reply Last reply
      0
      • Y YaronNir

        What is the hr result when CoCreateInstance Fails? look the result in the error lookup. hope this helps Yaron Ask not what your application can do for you, Ask what you can do for your application

        A Offline
        A Offline
        asdf1753
        wrote on last edited by
        #3

        it says in HRESULT "CoInitialize has not been called."

        Y 1 Reply Last reply
        0
        • A asdf1753

          it says in HRESULT "CoInitialize has not been called."

          Y Offline
          Y Offline
          YaronNir
          wrote on last edited by
          #4

          There ya go :) in order to call CoCreateInstance, you need to load the COM libraries. this is done by CoInitialize method (check out MSDN for more information) don't forget to call CoUninitialize when done using the COM libraries good luck Yaron:sigh: Ask not what your application can do for you, Ask what you can do for your application

          A 1 Reply Last reply
          0
          • Y YaronNir

            There ya go :) in order to call CoCreateInstance, you need to load the COM libraries. this is done by CoInitialize method (check out MSDN for more information) don't forget to call CoUninitialize when done using the COM libraries good luck Yaron:sigh: Ask not what your application can do for you, Ask what you can do for your application

            A Offline
            A Offline
            asdf1753
            wrote on last edited by
            #5

            Dear Friend, It is true i must do CoInitialize, i have forget it. Thank u:rose::)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups