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. ATL / WTL / STL
  4. CoCreateInstance(CLSID_SpVoice); fails with Class not registered

CoCreateInstance(CLSID_SpVoice); fails with Class not registered

Scheduled Pinned Locked Moved ATL / WTL / STL
csharpvisual-studiocom
4 Posts 2 Posters 12 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.
  • P Offline
    P Offline
    ptr_Electron
    wrote on last edited by
    #1

    I am using Microsoft speech sdk v 11 (https://msdn.microsoft.com/en-us/library/jj127898.aspx[^]). the below call fails, when I check GetLastError, observed that it fails to message "Class not registered". visual studio 2008, windows 7

    hr = cpVoice.CoCreateInstance(CLSID_SpVoice);

    Please advise

    J 1 Reply Last reply
    0
    • P ptr_Electron

      I am using Microsoft speech sdk v 11 (https://msdn.microsoft.com/en-us/library/jj127898.aspx[^]). the below call fails, when I check GetLastError, observed that it fails to message "Class not registered". visual studio 2008, windows 7

      hr = cpVoice.CoCreateInstance(CLSID_SpVoice);

      Please advise

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      When using Windows 7 64-bit, check if you have installed the version of the Microsoft Speech Platform - Runtime that matches your project settings (32 or 64 bit), or just change your project to match the installed version.

      P 1 Reply Last reply
      0
      • J Jochen Arndt

        When using Windows 7 64-bit, check if you have installed the version of the Microsoft Speech Platform - Runtime that matches your project settings (32 or 64 bit), or just change your project to match the installed version.

        P Offline
        P Offline
        ptr_Electron
        wrote on last edited by
        #3

        Thanks for response. project is 32 bit and I installed x86. I think that should be ok. what could be other reasons please advise. thanks in advance.

        J 1 Reply Last reply
        0
        • P ptr_Electron

          Thanks for response. project is 32 bit and I installed x86. I think that should be ok. what could be other reasons please advise. thanks in advance.

          J Offline
          J Offline
          Jochen Arndt
          wrote on last edited by
          #4

          Did you have called CoInitialize[Ex] before? To check if it is registered you can look into the registry at HKCR\CLSID\value_of_CLSID_SpVoice. If it is not present, it may help to re-install the runtime.

          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