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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. COM
  4. CoCreateInstance failed

CoCreateInstance failed

Scheduled Pinned Locked Moved COM
helpquestion
5 Posts 4 Posters 1 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.
  • W Offline
    W Offline
    Wolfgang Jia
    wrote on last edited by
    #1

    I have a simple component. It receives and stores data. The data needs to be decoded before can be used. Then I set a CodecManager in the component. When I try to retrieve the data in a event processing, the codec manager should provide a codec for use. But at this point, CodecManager failed. I don't know why? Anybody help. Is it legal to call CoCreateInstance in event processing?

    S K S 3 Replies Last reply
    0
    • W Wolfgang Jia

      I have a simple component. It receives and stores data. The data needs to be decoded before can be used. Then I set a CodecManager in the component. When I try to retrieve the data in a event processing, the codec manager should provide a codec for use. But at this point, CodecManager failed. I don't know why? Anybody help. Is it legal to call CoCreateInstance in event processing?

      S Offline
      S Offline
      sudeesh
      wrote on last edited by
      #2

      U can call CoCreateinstance in the event handler but it is better u create the component some where else say add an Init function and within this u create it and use in the thread.

      Sudeesh

      W 1 Reply Last reply
      0
      • W Wolfgang Jia

        I have a simple component. It receives and stores data. The data needs to be decoded before can be used. Then I set a CodecManager in the component. When I try to retrieve the data in a event processing, the codec manager should provide a codec for use. But at this point, CodecManager failed. I don't know why? Anybody help. Is it legal to call CoCreateInstance in event processing?

        K Offline
        K Offline
        Kamaraj m
        wrote on last edited by
        #3

        The information u given is too abstract. provide more clarity on ur problem or place some piece of code for reference. becaz we cant find out the root cause without code samples.

        Kamaraj[in]

        1 Reply Last reply
        0
        • W Wolfgang Jia

          I have a simple component. It receives and stores data. The data needs to be decoded before can be used. Then I set a CodecManager in the component. When I try to retrieve the data in a event processing, the codec manager should provide a codec for use. But at this point, CodecManager failed. I don't know why? Anybody help. Is it legal to call CoCreateInstance in event processing?

          S Offline
          S Offline
          Steve S
          wrote on last edited by
          #4

          When you say 'event processing', do you mean in a COM sink interface, or normal message handling? What HRESULT does CoCreateInstance return? Can you write a minimal COM client that calls CoInitialize(), and successfully CoCreateInstance the codec, then release it and call CoUninitialize()?

          Steve S Developer for hire

          1 Reply Last reply
          0
          • S sudeesh

            U can call CoCreateinstance in the event handler but it is better u create the component some where else say add an Init function and within this u create it and use in the thread.

            Sudeesh

            W Offline
            W Offline
            Wolfgang Jia
            wrote on last edited by
            #5

            Thanks

            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