How can I get the version number of the installed Speech API?

Till now my MFC program uses TextToSpeech by means of the Speech SDK and SAPI 
5.0. For a certain reason I must now use SAPI 5.1. Therefore I must make in 
my program the following decision:

nothing yet installed    =>    install SAPI 5.1
SAPI 5.0 installed       =>    install SAPI 5.1
SAPI 5.1 installed       =>    do nothing

Can I somehow get in my MFC program the current SAPI version number with 
e.g. a SAPI function or similar? Thanks for any helpful comments.

Eddy

0
Eddy (10)
1/17/2008 2:04:02 PM
vc.mfc 33608 articles. 0 followers. Follow

6 Replies
527 Views

Similar Articles

[PageSpeed] 21

"Eddy" <Eddy@discussions.microsoft.com> wrote in message 
news:D51C8B3D-4996-43F8-8238-D8F15DC52054@microsoft.com...
> Till now my MFC program uses TextToSpeech by means of the Speech SDK and 
> SAPI
> 5.0. For a certain reason I must now use SAPI 5.1. Therefore I must make 
> in
> my program the following decision:
>
> Can I somehow get in my MFC program the current SAPI version number with
> e.g. a SAPI function or similar? Thanks for any helpful comments.


I'm not sure if this is the right approach, but if you look in the Registry 
under
HKCR\TypeLib\{C866CA3A-32F7-11D2-9602-00C04F8EE628}
there is a subkey whose name is the the SAPI version number (5.0 on XP, 5.3 
on Vista).

0
nobody (271)
1/17/2008 5:44:49 PM
> "Eddy" <Eddy@discussions.microsoft.com> wrote in message 
> news:D51C8B3D-4996-43F8-8238-D8F15DC52054@microsoft.com...
> > Till now my MFC program uses TextToSpeech by means of the Speech SDK and 
> > SAPI
> > 5.0. For a certain reason I must now use SAPI 5.1. Therefore I must make 
> > in
> > my program the following decision:
> >
> > Can I somehow get in my MFC program the current SAPI version number with
> > e.g. a SAPI function or similar? Thanks for any helpful comments.
> 
> 
> I'm not sure if this is the right approach, but if you look in the Registry 
> under
> HKCR\TypeLib\{C866CA3A-32F7-11D2-9602-00C04F8EE628}
> there is a subkey whose name is the the SAPI version number (5.0 on XP, 5.3 
> on Vista).
> 
It does not seem to be the correct value. I've installed the 5.1 SAPI, but 
this registry value is 5.0. Propably this is the version of the SAPI 
delivered with XP by default. Thanks anyway.
0
Eddy (10)
1/18/2008 8:30:00 AM
"Eddy" <Eddy@discussions.microsoft.com> wrote in message
news:ECE9B6F1-DACD-49F4-8DA7-3245B3E773C3@microsoft.com...
>> I'm not sure if this is the right approach, but if you look in the
>> Registry
>> under
>> HKCR\TypeLib\{C866CA3A-32F7-11D2-9602-00C04F8EE628}
>> there is a subkey whose name is the the SAPI version number (5.0 on XP,
>> 5.3
>> on Vista).
>>
> It does not seem to be the correct value. I've installed the 5.1 SAPI, but
> this registry value is 5.0. Propably this is the version of the SAPI
> delivered with XP by default. Thanks anyway.

You could look at HKEY_CLASSES_ROOT\CLSID\{Guid}\InprocServer32 to find out 
the path to the SAPI DLL, then read it's version using VerQueryValue(), etc.

-- David


0
dc2983 (3206)
1/19/2008 8:12:11 PM
> >> I'm not sure if this is the right approach, but if you look in the
> >> Registry
> >> under
> >> HKCR\TypeLib\{C866CA3A-32F7-11D2-9602-00C04F8EE628}
> >> there is a subkey whose name is the the SAPI version number (5.0 on XP,
> >> 5.3
> >> on Vista).
> >>
> > It does not seem to be the correct value. I've installed the 5.1 SAPI, but
> > this registry value is 5.0. Propably this is the version of the SAPI
> > delivered with XP by default. Thanks anyway.
> 
> You could look at HKEY_CLASSES_ROOT\CLSID\{Guid}\InprocServer32 to find out 
> the path to the SAPI DLL, then read it's version using VerQueryValue(), etc.
> 
> -- David

Thanks David. Sounds promising but as I now found a solution for my problem 
I did not follow your hint further. My solution: I make the SAPI 5.1 version 
with the Visual Studio Installer. The solution now is: within the installer I 
can tell the msi installation file to write something somewhere in the 
registry. Well, so I do. The msi file writes its own version to 
HKLM\Software\SAPI\Version. So if my MFC program can find this entry, it 
knows that the 5.1 SAPI version is already installed.
0
Eddy (10)
1/21/2008 11:06:01 AM
"Eddy" <Eddy@discussions.microsoft.com> wrote in message 
news:52879B35-2A38-4464-A58E-8FD6175B161D@microsoft.com...
> Thanks David. Sounds promising but as I now found a solution for my 
> problem
> I did not follow your hint further. My solution: I make the SAPI 5.1 
> version
> with the Visual Studio Installer. The solution now is: within the 
> installer I
> can tell the msi installation file to write something somewhere in the
> registry. Well, so I do. The msi file writes its own version to
> HKLM\Software\SAPI\Version. So if my MFC program can find this entry, it
> knows that the 5.1 SAPI version is already installed.

But this doesn't sound foolproof.  What if SAPI 5.1 was already installed; 
therefore your installer won't install SAPI 5.1 and thus won't write the 
registry entry, right?  Also, it's not a good idea to overwrite the SAPI reg 
key with something you made up.  They might have left it at 5.0 for some 
other reason that if you set it to 5.1 it will screw it up.  I would find 
another way.

-- David


0
dc2983 (3206)
1/21/2008 5:36:55 PM
The foolproof way is to query for an interface that you know only SAPI 5.1 
has. If you do not get the interface, then you do not have 5.1 installed.

Cheers
Check Abdoul
---------------------


"Eddy" <Eddy@discussions.microsoft.com> wrote in message 
news:52879B35-2A38-4464-A58E-8FD6175B161D@microsoft.com...
>> >> I'm not sure if this is the right approach, but if you look in the
>> >> Registry
>> >> under
>> >> HKCR\TypeLib\{C866CA3A-32F7-11D2-9602-00C04F8EE628}
>> >> there is a subkey whose name is the the SAPI version number (5.0 on 
>> >> XP,
>> >> 5.3
>> >> on Vista).
>> >>
>> > It does not seem to be the correct value. I've installed the 5.1 SAPI, 
>> > but
>> > this registry value is 5.0. Propably this is the version of the SAPI
>> > delivered with XP by default. Thanks anyway.
>>
>> You could look at HKEY_CLASSES_ROOT\CLSID\{Guid}\InprocServer32 to find 
>> out
>> the path to the SAPI DLL, then read it's version using VerQueryValue(), 
>> etc.
>>
>> -- David
>
> Thanks David. Sounds promising but as I now found a solution for my 
> problem
> I did not follow your hint further. My solution: I make the SAPI 5.1 
> version
> with the Visual Studio Installer. The solution now is: within the 
> installer I
> can tell the msi installation file to write something somewhere in the
> registry. Well, so I do. The msi file writes its own version to
> HKLM\Software\SAPI\Version. So if my MFC program can find this entry, it
> knows that the 5.1 SAPI version is already installed. 


0
Check
1/22/2008 12:22:44 AM
Reply:

Similar Artilces:

Can't see 401(k) contribiltion total
I've set up a 401(k)accont. I transfer contribiltions to this 401(k)account from each paycheck. When I go to the 401 (k) account view, it shows all the informations such as transections and the account vallue ect., EXCEPT the total contribiltion. I want to know not only what my 401(k) vallue is, but how much money I have contribilt total or over a period of time as well. I find no place to see it. Anybody can help? I'm using Money2002 and 2004 Trial Verstion. Thanks a lot! ...

How can I print a selection in Outlook 2003?
How can I print just a selection of an email in Outlook 2003? The printer driver window is different from the one that comes up in Outlook Express. Thank you! You can do this for HTML formatted messages. Highlight your text, File-> Print... and select to print only the selection -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Murphie" <Murphie@discussions.microsoft.com> wrote in message news:92F39B50-B877-408A-AAA7-DF350B1D72ED@microsoft.com....

error: OBE-15502 Can only have 16000 per document
Hi, I tried to export data from oracle query builder to Excel sheet, got a error message: OBE-15502 Can only have 16000 per document Is there any way i can get more records(over 16000 or unlimited) in one sheet? thanks. -- JJ ...

Can different editions of Publisher be used together?
If my son uses Publisher 2003 on a school computer, downloads his work to a flash drive, brings it home to edit on Publisher 2007, will he then be able to take the edited work back to the school computer to be used, or will it not be compatible? Stateparent wrote: > If my son uses Publisher 2003 on a school computer, downloads his work to a > flash drive, brings it home to edit on Publisher 2007, will he then be able > to take the edited work back to the school computer to be used, or will it > not be compatible? Publisher 2003 and 2007 share a common file format, so the sc...

Can't send/receive
anyone have a situation where all of sudden they can't send new messages or receive anything? I get a message when I click on "accounts" that says 'fatal error in outlook unable to complete operation" ...

Can not Customize Leads View
Hi I have tried to customize the Leads view, I tried to add a view and add some columns to it. The view is shown however I see only the name column. When I go back to the View customization, I see the columns I added. Published your customizations??? -- ---------------------- regards, Ilya Milshtein MBS Master, MBSCP, MCP Softline International www.softline.ru "alsap" wrote: > Hi I have tried to customize the Leads view, I tried to add a view and add > some columns to it. > The view is shown however I see only the name column. > When I go back to the View customi...

Can I change the "Applied Task Update Requests and Errors" view?
I really like this view in PWA 2007, but I would like to replace one column with another. Is this view customizeable? Randy -- Bad news, my friend. This view is not customizable, nor is the view shown in the Task Updates customizable (which many users wish it was). Hope this help. -- Dale A. Howard [MVP] VP of Educational Services msProjectExperts http://www.msprojectexperts.com http://www.projectserverexperts.com "We write the books on Project Server" "Randy Schmid" <RandySchmid@discussions.microsoft.com> wrote in message news:72FA34B5-...

Page numbers 12-02-09
On MS Word 2003, I am formatting a 5.5 x 8.5 book. How can I get the page numbers to come in at 7.75? I tried bringing the bottom 'margin' up to 8.5, but the numbers still come in at 10.5 on the 11" vertical page. Actually I've tried a lot of things! Footers also seem to want to hit the bottom 1/2 or inch of the 11 available. How to number so that they show within the 8.5 space on a 'sheet'?. Susanne, sideways isn't an option, because I may go for a 6 x 9 format. TIA! Sylvia M. You must change your footer margin as well as the bottom margi...

Should be an easy but I can not figure it out!!
I have a text box where the user enters a date and it is assigned to variable txtDate. How to I convert that to the serial number of the date? Thanks for the help IIRC, you can use DATEVAL(String) to get the serial date. -- HTH, Barb Reinhardt "VinceW" wrote: > I have a text box where the user enters a date and it is assigned to variable > txtDate. How to I convert that to the serial number of the date? > > Thanks for the help Barb, Thanks for the quick reply, however I get the error "Sub or Function not defined" when trying...

Bulk attachments
I have a very long list of Images in a single folder that I want to attach to seperate fields in a table/form. Each record contains two images, which are named like this: W:\Foldername\Micromap Run 001 A.bmp =(1st record) W:\Foldername\Micromap Run 001 B.bmp =(1st record) W:\Foldername\Micromap Run 002 A.bmp =(2nd record) W:\Foldername\Micromap Run 002 B.bmp =(2nd record) W:\Foldername\Micromap Run 003 A.bmp =(3rd record) W:\Foldername\Micromap Run 003 B.bmp =(3rd record) and so on... Image A goes to field A Image B goes to field B Is there a way of doing this au...

can't uninstall exchange from cluster nodes
hi our client has several exchange clusters, and one of them is being retired. we have removed the exchange resources and the EVS and the server no longer appears in the organization and everything else there seems to be ok. we can't seem to uninstall exchange from either of the nodes. setup will start saying it's loading components then terminates with no error; happens on both nodes. both nodes are exchange 2003 sp1 on windows 2003. i did find the setup log; here is what it says, hope someone can shed some light on this (company info replaced with < >): [19:47:23] *...

Can't delete email #2
I'm am trying to help a friend who is using Outlook Express on W98, I cannot delete any messages from her in box. She has over 500 in there, which may be part of the problem. Any suggestions? Desperate! Mark Mark Ryan <m.ryan@earthlink.com> wrote: > I'm am trying to help a friend who is using Outlook Express > on W98, I cannot delete any messages from her in box. She > has over 500 in there, which may be part of the problem. > Any suggestions? The first suggestion is to ask in an Outlok Express newsgroup. The second suggestion is to delete Deleted Items.dbx and ...

CListCtrl
Hi, Does anybody know an easy of removing the black vertical tracking line that appears while resizing columns? I've been trying to prevent it through HDN_ENDTRACK / HDN_TRACK, but I wasn't successfull. Is there a specific flag that I can set to disable it instead? Thanks in advance for your time, Best regards, -Onur I can't imagine why you'd want to do that, but here's my suggestion: Override the CListrCtrl and CHeaderCtrl class, and have your listview control use your derived header control. In the header control class, handle the WM_SETCURSOR message and load a d...

Can Not Reply To Emails
Running Windows 7 Professional with latest version of WLM. I get email messages I can not reply to. The reply button is grayed out. For now I am forwarding them to my WinXP computer and then replying from that computer with OE6. Anybody have any ideas? -- <Bill> Brought to you from Anchorage, Alaska. The most obvious reason for not having an active Reply button is not having a mail account set up. --=20 Gary VanderMolen, Microsoft MVP (Mail) http://mvp.support.microsoft.com/default.aspx/profile/vandermolen "Bill Bradshaw" <bradshaw@gci.net>...

Cannot install lame mp3 on vista x64
Hi, Somebody gave me advice to do: 1. Opening up a command prompt by typing "cmd" in the run box and pressing Ctrl+Shift+Enter (to run as Administrator). 2. Changing directories to sysWOW64 ("cd C:\windows\syswow64") 3. Typing the following (example_path replaced with the actual path to the extracted files), then hit enter: rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 0 c:\Temp_Folder_Path\codecXXX.inf I did everything and it was looking that it was installed but still in my VirtualDub this codec doesn't exist. Can someo...

Outlook 2002 Version Problem
9/19/04 Need Help! We have a personal computer but can not get my name deleted in the field named owner, and cannot get Outlook activated to perform tasks. Reminder feature and alarm does not work either. I want a different name to appear on Untitled Task screen when someone else is entering info. for a task to be done either as a reminder to one's self or emailing that task to be done by someone else at a different personal computer that is not connected to a company network. I don't know a lot about Outlook so can tasks be assigned for yourself and as reminders as well as...

How can I rename a database table?
Hi I am working on a project that uses the MFC CDatabase and CRecordset classes to handle its interfacing with an Access database. It is necessary for the software to rename a table within existing user databases to ensure that they are valid for use with the new version of the software. As a result of my limited database and MFC knowledge I am having difficulty finding a way of renaming the table. I have tried using the following: try { theDataBase.ExecuteSQL( "RENAME oldTableName TO newTableName"); } catch( CDBException* e) { e->m_strError; } However, it results in th...

What is the quickest way to get an xml based dataset to add entries to SQL Server?
Because there is no 'datareader' involved, what is the most efficient way to get an XML based dataset to be added to an SQL server dataset? I would hate to have to create a new SQL connection and iterate through making "executenonquery" for each row in the dataset. That seems horribly in-efficient. I know of no other way to get an xml based dataset to push data to the database though. Any pointers? Thanks for any pointers, Peter Robbins Freelance Programmer C#/PHP "MurdockSE" <murdock@nc.rr.com> wrote in message news:1153922058.675709.165630@h48g2000cwc.go...

how can I restore unsaved changes in excel #2
...

Can (or how can) I do this
Hello, My Access application tracks an employee's progress through a process similar to hiring. There are 5 steps in the process. I track 4 of the steps by counting the number of times a value appears in a date field for that step. The count is then displayed and used in a calculation. The 5th step is more complicated. The 5th step needs to determine if the employee has verified that he can access all the applications that he should have access to. My process tracking table has the first 4 dates. The application access info comes from a different table. This process trackin...

Can Not Connect to Exchange Server after Mailbox Move
I have 2 exchange servers. While logged into the domain, and at the location, I can log into the email system just fine. While remote VPN in, I can not access the server. I can ping the server, I can see all shares, and I can even access the printer and print from the exchange server. But I can not get to it with email. Any Ideas? Oh.. both exchange 5.5, both in the same site. Exchange Admin shows both sites just fine. is there a firewall with rules configured, in between the users vpn connection and the internal network? kmelillo@gmail.com wrote: > Oh.. both exchange 5.5, bot...

Can not archive
I get the message "Error while archiving folder "Deleted Items" in store "mailbox-user name." Some items could not be copied. They were either moved or deleted, or access was denied. This only happend recently and only occurs with the deleted items. I can archive send and the inbox without a problem. Any suggestions? Thanks ...

can'not set or connect to an email account
This is a multi-part message in MIME format. ------=_NextPart_000_0010_01CAAC2C.BBDF6A00 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0011_01CAAC2C.BBDF9110" ------=_NextPart_001_0011_01CAAC2C.BBDF9110 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable I am triying to set an email account.I am vodafone mobile customer.Some = settings bloking my access to email service.I am not a professinal = computer user,following the the instractions but no luck.Can you help = me? Thank you. ------=_Nex...

Can you convert picture into Visio?
Is there a way to convert picture into Visio format? If so, how? It would depend on what format the picture was in. For most cases, this is not an easy task. John... Visio MVP "tbae" wrote: > Is there a way to convert picture into Visio format? If so, how? ...

Money 2004 60-day version: Uninstall problem when a user is not an administrator
I want to report a bug in the 60-day version of Money 2004. Hopefully people in PSS or the product group read this newsgroup. I do not know the product ID for Money 2004, nor did the Assisted Support lookup tool list one for Money 2004, so I could not use Assisted Support. To repro: 1. Install Money 2004 60-day version on WinXP Pro using an account in the Administrators group. 2. Log on as another user that is not part of Administrators. Log off. 3. From the first account, uninstall Money 2004 using Add/Remove Programs. 4. Log on as the other non-admin user. Get a prompt from...