' ########################################################################################
' Microsoft Windows
' File: sapi.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
' ########################################################################################
' Library name: SpeechLib
' Version: 5.4
' Documentation string: Microsoft Speech Object Library
' Path: C:\Windows\System32\Speech\Common\sapi.dll
' Library GUID: {C866CA3A-32F7-11D2-9602-00C04F8EE628}
' ########################################################################################
#IF NOT %DEF(PBX_sapi_PBI)
#DEFINE PBX_sapi_PBI
%EQUATE `SAPI_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
#INCLUDE ONCE "Legacy/System/MMSystem.inc"
#INCLUDE ONCE "Legacy/System/sperror.inc"
$LIBID_SpeechLib = GUID$("{C866CA3A-32F7-11D2-9602-00C04F8EE628}")
'#ifndef _SAPI_VER
'// Use SAPI 5.4 by default if target Windows 7
'#if _WIN32_WINNT >= 0x0601
'#define _SAPI_VER 0x054
'#elif _WIN32_WINNT >= 0x0600
'#define _SAPI_VER 0x053
'#else // _WIN32_WINNT < 0x0600
'#define _SAPI_VER 0x051
'#endif // _WIN32_WINNT >= 0x0601
'#endif // _SAPI_VER
#IF NOT %DEF(%SAPI_VER)
 '// Use SAPI 5.4 by default if target Windows 7
 #IF %WIN32_WINNT >= &H0601
 %SAPI_VER = &H054
 #ELSEIF %WIN32_WINNT >= &H0600
 %SAPI_VER = &H053
 #ELSE ' // _WIN32_WINNT < 0x0600
 %SAPI_VER = &H051
 #ENDIF ' // _WIN32_WINNT >= 0x0601
#ENDIF ' // _SAPI_VER
' ========================================================================================
' ProgIDs (Program identifiers)
' ========================================================================================
' CLSID = {9EF96870-E160-4792-820D-48CF0649E4EC}
$PROGID_SpAudioFormat1 = "SAPI.SpAudioFormat.1"
' CLSID = {90903716-2F42-11D3-9C26-00C04F8EF87C}
$PROGID_SpCompressedLexicon1 = "SAPI.SpCompressedLexicon.1"
' CLSID = {8DBEF13F-1948-4AA8-8CF0-048EEBED95D8}
$PROGID_SpCustomStream1 = "SAPI.SpCustomStream.1"
' CLSID = {947812B3-2AE1-4644-BA86-9E90DED7EC91}
$PROGID_SpFileStream1 = "SAPI.SpFileStream.1"
' CLSID = {73AD6842-ACE0-45E8-A4DD-8795881A2C2A}
$PROGID_SpInProcRecoContext1 = "SAPI.SpInProcRecoContext.1"
' CLSID = {41B89B6B-9399-11D2-9623-00C04F8EE628}
$PROGID_SpInprocRecognizer1 = "Sapi.SpInprocRecognizer.1"
' CLSID = {0655E396-25D0-11D3-9C26-00C04F8EF87C}
$PROGID_SpLexicon1 = "SAPI.SpLexicon.1"
' CLSID = {5FB7EF7D-DFF4-468A-B6B7-2FCBD188F994}
$PROGID_SpMemoryStream1 = "SAPI.SpMemoryStream.1"
' CLSID = {AB1890A0-E91F-11D2-BB91-00C04F8EE6C0}
$PROGID_SpMMAudioEnum1 = "SAPI.SpMMAudioEnum.1"
' CLSID = {CF3D2E50-53F2-11D2-960C-00C04F8EE628}
$PROGID_SpMMAudioIn1 = "SAPI.SpMMAudioIn.1"
' CLSID = {A8C680EB-3D32-11D2-9EE7-00C04F797396}
$PROGID_SpMMAudioOut1 = "SAPI.SpMMAudioOut.1"
' CLSID = {E2AE5372-5D40-11D2-960E-00C04F8EE628}
$PROGID_SpNotifyTranslator1 = "SAPI.SpNotifyTranslator.1"
' CLSID = {455F24E9-7396-4A16-9715-7C0FDBE3EFE3}
$PROGID_SpNullPhoneConverter1 = "SAPI.SpNullPhoneConverter.1"
' CLSID = {EF411752-3736-4CB4-9C8C-8EF4CCB58EFE}
$PROGID_SpObjectToken1 = "SAPI.SpObjectToken.1"
' CLSID = {A910187F-0C7A-45AC-92CC-59EDAFB77B53}
$PROGID_SpObjectTokenCategory1 = "SAPI.SpObjectTokenCategory.1"
' CLSID = {9185F743-1143-4C28-86B5-BFF14F20E5C8}
$PROGID_SpPhoneConverter1 = "SAPI.SpPhoneConverter.1"
' CLSID = {C23FC28D-C55F-4720-8B32-91F73C2BD5D1}
$PROGID_SpPhraseInfoBuilder1 = "SAPI.SpPhraseInfoBuilder.1"
' CLSID = {96749373-3391-11D2-9EE3-00C04F797396}
$PROGID_SpResourceManager1 = "SAPI.SpResourceManager.1"
' CLSID = {47206204-5ECA-11D2-960F-00C04F8EE628}
$PROGID_SpSharedRecoContext1 = "SAPI.SpSharedRecoContext.1"
' CLSID = {3BEE4890-4FE9-4A37-8C1E-5E7E12791C1F}
$PROGID_SpSharedRecognizer1 = "Sapi.SpSharedRecognizer.1"
' CLSID = {0D722F1A-9FCF-4E62-96D8-6DF8F01A26AA}
$PROGID_SpShortcut1 = "SAPI.SpShortcut.1"
' CLSID = {715D9C59-4442-11D2-9605-00C04F8EE628}
$PROGID_SpStream1 = "SAPI.SpStream.1"
' CLSID = {7013943A-E2EC-11D2-A086-00C04F8EF9B5}
$PROGID_SpStreamFormatConverter1 = "SAPI.SpStreamFormatConverter.1"
' CLSID = {0F92030A-CBFD-4AB8-A164-FF5985547FF6}
$PROGID_SpTextSelectionInformation1 = "SAPI.SpTextSelectionInformation.1"
' CLSID = {C9E37C15-DF92-4727-85D6-72E5EEB6995A}
$PROGID_SpUnCompressedLexicon1 = "SAPI.SpUncompressedLexicon.1"
' CLSID = {96749377-3391-11D2-9EE3-00C04F797396}
$PROGID_SpVoice1 = "SAPI.SpVoice.1"
' CLSID = {C79A574C-63BE-44B9-801F-283F87F898BE}
$PROGID_SpWaveFormatEx1 = "SAPI.SpWaveFormatEx.1"
' ========================================================================================
' Version independent ProgIDs
' ========================================================================================
' CLSID = {9EF96870-E160-4792-820D-48CF0649E4EC}
$PROGID_SpAudioFormat = "SAPI.SpAudioFormat"
' CLSID = {90903716-2F42-11D3-9C26-00C04F8EF87C}
$PROGID_SpCompressedLexicon = "SAPI.SpCompressedLexicon"
' CLSID = {8DBEF13F-1948-4AA8-8CF0-048EEBED95D8}
$PROGID_SpCustomStream = "SAPI.SpCustomStream"
' CLSID = {947812B3-2AE1-4644-BA86-9E90DED7EC91}
$PROGID_SpFileStream = "SAPI.SpFileStream"
' CLSID = {73AD6842-ACE0-45E8-A4DD-8795881A2C2A}
$PROGID_SpInProcRecoContext = "SAPI.SpInProcRecoContext"
' CLSID = {41B89B6B-9399-11D2-9623-00C04F8EE628}
$PROGID_SpInprocRecognizer = "Sapi.SpInprocRecognizer"
' CLSID = {0655E396-25D0-11D3-9C26-00C04F8EF87C}
$PROGID_SpLexicon = "SAPI.SpLexicon"
' CLSID = {5FB7EF7D-DFF4-468A-B6B7-2FCBD188F994}
$PROGID_SpMemoryStream = "SAPI.SpMemoryStream"
' CLSID = {AB1890A0-E91F-11D2-BB91-00C04F8EE6C0}
$PROGID_SpMMAudioEnum = "SAPI.SpMMAudioEnum"
' CLSID = {CF3D2E50-53F2-11D2-960C-00C04F8EE628}
$PROGID_SpMMAudioIn = "SAPI.SpMMAudioIn"
' CLSID = {A8C680EB-3D32-11D2-9EE7-00C04F797396}
$PROGID_SpMMAudioOut = "SAPI.SpMMAudioOut"
' CLSID = {E2AE5372-5D40-11D2-960E-00C04F8EE628}
$PROGID_SpNotifyTranslator = "SAPI.SpNotifyTranslator"
' CLSID = {455F24E9-7396-4A16-9715-7C0FDBE3EFE3}
$PROGID_SpNullPhoneConverter = "SAPI.SpNullPhoneConverter"
' CLSID = {EF411752-3736-4CB4-9C8C-8EF4CCB58EFE}
$PROGID_SpObjectToken = "SAPI.SpObjectToken"
' CLSID = {A910187F-0C7A-45AC-92CC-59EDAFB77B53}
$PROGID_SpObjectTokenCategory = "SAPI.SpObjectTokenCategory"
' CLSID = {9185F743-1143-4C28-86B5-BFF14F20E5C8}
$PROGID_SpPhoneConverter = "SAPI.SpPhoneConverter"
' CLSID = {C23FC28D-C55F-4720-8B32-91F73C2BD5D1}
$PROGID_SpPhraseInfoBuilder = "SAPI.SpPhraseInfoBuilder"
' CLSID = {96749373-3391-11D2-9EE3-00C04F797396}
$PROGID_SpResourceManager = "SAPI.SpResourceManager"
' CLSID = {47206204-5ECA-11D2-960F-00C04F8EE628}
$PROGID_SpSharedRecoContext = "SAPI.SpSharedRecoContext"
' CLSID = {3BEE4890-4FE9-4A37-8C1E-5E7E12791C1F}
$PROGID_SpSharedRecognizer = "Sapi.SpSharedRecognizer"
' CLSID = {0D722F1A-9FCF-4E62-96D8-6DF8F01A26AA}
$PROGID_SpShortcut = "SAPI.SpShortcut"
' CLSID = {715D9C59-4442-11D2-9605-00C04F8EE628}
$PROGID_SpStream = "SAPI.SpStream"
' CLSID = {7013943A-E2EC-11D2-A086-00C04F8EF9B5}
$PROGID_SpStreamFormatConverter = "SAPI.SpStreamFormatConverter"
' CLSID = {0F92030A-CBFD-4AB8-A164-FF5985547FF6}
$PROGID_SpTextSelectionInformation = "SAPI.SpTextSelectionInformation"
' CLSID = {C9E37C15-DF92-4727-85D6-72E5EEB6995A}
$PROGID_SpUnCompressedLexicon = "SAPI.SpUncompressedLexicon"
' CLSID = {96749377-3391-11D2-9EE3-00C04F797396}
$PROGID_SpVoice = "SAPI.SpVoice"
' CLSID = {C79A574C-63BE-44B9-801F-283F87F898BE}
$PROGID_SpWaveFormatEx = "SAPI.SpWaveFormatEx"
' ========================================================================================
' ClsIDs (Class identifiers)
' ========================================================================================
$CLSID_SpAudioFormat = GUID$("{9EF96870-E160-4792-820D-48CF0649E4EC}")
$CLSID_SpCompressedLexicon = GUID$("{90903716-2F42-11D3-9C26-00C04F8EF87C}")
$CLSID_SpCustomStream = GUID$("{8DBEF13F-1948-4AA8-8CF0-048EEBED95D8}")
$CLSID_SpFileStream = GUID$("{947812B3-2AE1-4644-BA86-9E90DED7EC91}")
$CLSID_SpInProcRecoContext = GUID$("{73AD6842-ACE0-45E8-A4DD-8795881A2C2A}")
$CLSID_SpInprocRecognizer = GUID$("{41B89B6B-9399-11D2-9623-00C04F8EE628}")
$CLSID_SpLexicon = GUID$("{0655E396-25D0-11D3-9C26-00C04F8EF87C}")
$CLSID_SpMemoryStream = GUID$("{5FB7EF7D-DFF4-468A-B6B7-2FCBD188F994}")
$CLSID_SpMMAudioEnum = GUID$("{AB1890A0-E91F-11D2-BB91-00C04F8EE6C0}")
$CLSID_SpMMAudioIn = GUID$("{CF3D2E50-53F2-11D2-960C-00C04F8EE628}")
$CLSID_SpMMAudioOut = GUID$("{A8C680EB-3D32-11D2-9EE7-00C04F797396}")
$CLSID_SpNotifyTranslator = GUID$("{E2AE5372-5D40-11D2-960E-00C04F8EE628}")
$CLSID_SpNullPhoneConverter = GUID$("{455F24E9-7396-4A16-9715-7C0FDBE3EFE3}")
$CLSID_SpObjectToken = GUID$("{EF411752-3736-4CB4-9C8C-8EF4CCB58EFE}")
$CLSID_SpObjectTokenCategory = GUID$("{A910187F-0C7A-45AC-92CC-59EDAFB77B53}")
$CLSID_SpPhoneConverter = GUID$("{9185F743-1143-4C28-86B5-BFF14F20E5C8}")
$CLSID_SpPhoneticAlphabetConverter = GUID$("{4F414126-DFE3-4629-99EE-797978317EAD}")
$CLSID_SpPhraseInfoBuilder = GUID$("{C23FC28D-C55F-4720-8B32-91F73C2BD5D1}")
$CLSID_SpResourceManager = GUID$("{96749373-3391-11D2-9EE3-00C04F797396}")
$CLSID_SpSharedRecoContext = GUID$("{47206204-5ECA-11D2-960F-00C04F8EE628}")
$CLSID_SpSharedRecognizer = GUID$("{3BEE4890-4FE9-4A37-8C1E-5E7E12791C1F}")
$CLSID_SpShortcut = GUID$("{0D722F1A-9FCF-4E62-96D8-6DF8F01A26AA}")
$CLSID_SpStream = GUID$("{715D9C59-4442-11D2-9605-00C04F8EE628}")
$CLSID_SpStreamFormatConverter = GUID$("{7013943A-E2EC-11D2-A086-00C04F8EF9B5}")
$CLSID_SpTextSelectionInformation = GUID$("{0F92030A-CBFD-4AB8-A164-FF5985547FF6}")
$CLSID_SpUnCompressedLexicon = GUID$("{C9E37C15-DF92-4727-85D6-72E5EEB6995A}")
$CLSID_SpVoice = GUID$("{96749377-3391-11D2-9EE3-00C04F797396}")
$CLSID_SpWaveFormatEx = GUID$("{C79A574C-63BE-44B9-801F-283F87F898BE}")
' ========================================================================================
' IIDs (Interface identifiers)
' ========================================================================================
$IID_IEnumSpObjectTokens = GUID$("{06B64F9E-7FDA-11D2-B4F2-00C04F797396}")
$IID_ISpAudio = GUID$("{C05C768F-FAE8-4EC2-8E07-338321C12452}")
$IID_ISpContainerLexicon = GUID$("{8565572F-C094-41CC-B56E-10BD9C3FF044}")
$IID_ISpDataKey = GUID$("{14056581-E16C-11D2-BB90-00C04F8EE6C0}")
$IID_ISpeechAudio = GUID$("{CFF8E175-019E-11D3-A08E-00C04F8EF9B5}")
$IID_ISpeechAudioBufferInfo = GUID$("{11B103D8-1142-4EDF-A093-82FB3915F8CC}")
$IID_ISpeechAudioFormat = GUID$("{E6E9C590-3E18-40E3-8299-061F98BDE7C7}")
$IID_ISpeechAudioStatus = GUID$("{C62D9C91-7458-47F6-862D-1EF86FB0B278}")
$IID_ISpeechBaseStream = GUID$("{6450336F-7D49-4CED-8097-49D6DEE37294}")
$IID_ISpeechCustomStream = GUID$("{1A9E9F4F-104F-4DB8-A115-EFD7FD0C97AE}")
$IID_ISpeechDataKey = GUID$("{CE17C09B-4EFA-44D5-A4C9-59D9585AB0CD}")
$IID_ISpeechFileStream = GUID$("{AF67F125-AB39-4E93-B4A2-CC2E66E182A7}")
$IID_ISpeechGrammarRule = GUID$("{AFE719CF-5DD1-44F2-999C-7A399F1CFCCC}")
$IID_ISpeechGrammarRules = GUID$("{6FFA3B44-FC2D-40D1-8AFC-32911C7F1AD1}")
$IID_ISpeechGrammarRuleState = GUID$("{D4286F2C-EE67-45AE-B928-28D695362EDA}")
$IID_ISpeechGrammarRuleStateTransition = GUID$("{CAFD1DB1-41D1-4A06-9863-E2E81DA17A9A}")
$IID_ISpeechGrammarRuleStateTransitions = GUID$("{EABCE657-75BC-44A2-AA7F-C56476742963}")
$IID_ISpeechLexicon = GUID$("{3DA7627A-C7AE-4B23-8708-638C50362C25}")
$IID_ISpeechLexiconPronunciation = GUID$("{95252C5D-9E43-4F4A-9899-48EE73352F9F}")
$IID_ISpeechLexiconPronunciations = GUID$("{72829128-5682-4704-A0D4-3E2BB6F2EAD3}")
$IID_ISpeechLexiconWord = GUID$("{4E5B933C-C9BE-48ED-8842-1EE51BB1D4FF}")
$IID_ISpeechLexiconWords = GUID$("{8D199862-415E-47D5-AC4F-FAA608B424E6}")
$IID_ISpeechMemoryStream = GUID$("{EEB14B68-808B-4ABE-A5EA-B51DA7588008}")
$IID_ISpeechMMSysAudio = GUID$("{3C76AF6D-1FD7-4831-81D1-3B71D5A13C44}")
$IID_ISpeechObjectToken = GUID$("{C74A3ADC-B727-4500-A84A-B526721C8B8C}")
$IID_ISpeechObjectTokenCategory = GUID$("{CA7EAC50-2D01-4145-86D4-5AE7D70F4469}")
$IID_ISpeechObjectTokens = GUID$("{9285B776-2E7B-4BC0-B53E-580EB6FA967F}")
$IID_ISpeechPhoneConverter = GUID$("{C3E4F353-433F-43D6-89A1-6A62A7054C3D}")
$IID_ISpeechPhraseAlternate = GUID$("{27864A2A-2B9F-4CB8-92D3-0D2722FD1E73}")
$IID_ISpeechPhraseAlternates = GUID$("{B238B6D5-F276-4C3D-A6C1-2974801C3CC2}")
$IID_ISpeechPhraseElement = GUID$("{E6176F96-E373-4801-B223-3B62C068C0B4}")
$IID_ISpeechPhraseElements = GUID$("{0626B328-3478-467D-A0B3-D0853B93DDA3}")
$IID_ISpeechPhraseInfo = GUID$("{961559CF-4E67-4662-8BF0-D93F1FCD61B3}")
$IID_ISpeechPhraseInfoBuilder = GUID$("{3B151836-DF3A-4E0A-846C-D2ADC9334333}")
$IID_ISpeechPhraseProperties = GUID$("{08166B47-102E-4B23-A599-BDB98DBFD1F4}")
$IID_ISpeechPhraseProperty = GUID$("{CE563D48-961E-4732-A2E1-378A42B430BE}")
$IID_ISpeechPhraseReplacement = GUID$("{2890A410-53A7-4FB5-94EC-06D4998E3D02}")
$IID_ISpeechPhraseReplacements = GUID$("{38BC662F-2257-4525-959E-2069D2596C05}")
$IID_ISpeechPhraseRule = GUID$("{A7BFE112-A4A0-48D9-B602-C313843F6964}")
$IID_ISpeechPhraseRules = GUID$("{9047D593-01DD-4B72-81A3-E4A0CA69F407}")
$IID_ISpeechRecoContext = GUID$("{580AA49D-7E1E-4809-B8E2-57DA806104B8}")
$IID_ISpeechRecognizer = GUID$("{2D5F1C0C-BD75-4B08-9478-3B11FEA2586C}")
$IID_ISpeechRecognizerStatus = GUID$("{BFF9E781-53EC-484E-BB8A-0E1B5551E35C}")
$IID_ISpeechRecoGrammar = GUID$("{B6D6F79F-2158-4E50-B5BC-9A9CCD852A09}")
$IID_ISpeechRecoResult = GUID$("{ED2879CF-CED9-4EE6-A534-DE0191D5468D}")
$IID_ISpeechRecoResult2 = GUID$("{8E0A246D-D3C8-45DE-8657-04290C458C3C}")
$IID_ISpeechRecoResultDispatch = GUID$("{6D60EB64-ACED-40A6-BBF3-4E557F71DEE2}")
$IID_ISpeechRecoResultTimes = GUID$("{62B3B8FB-F6E7-41BE-BDCB-056B1C29EFC0}")
$IID_ISpeechResourceLoader = GUID$("{B9AC5783-FCD0-4B21-B119-B4F8DA8FD2C3}")
$IID_ISpeechTextSelectionInformation = GUID$("{3B9C7E7A-6EEE-4DED-9092-11657279ADBE}")
$IID_ISpeechVoice = GUID$("{269316D8-57BD-11D2-9EEE-00C04F797396}")
$IID_ISpeechVoiceStatus = GUID$("{8BE47B07-57F6-11D2-9EEE-00C04F797396}")
$IID_ISpeechWaveFormatEx = GUID$("{7A1EF0D5-1581-4741-88E4-209A49F11A10}")
$IID_ISpeechXMLRecoResult = GUID$("{AAEC54AF-8F85-4924-944D-B79D39D72E19}")
$IID_ISpEnginePronunciation = GUID$("{C360CE4B-76D1-4214-AD68-52657D5083DA}")
$IID_ISpEventSink = GUID$("{BE7A9CC9-5F9E-11D2-960F-00C04F8EE628}")
$IID_ISpEventSource = GUID$("{BE7A9CCE-5F9E-11D2-960F-00C04F8EE628}")
$IID_ISpEventSource2 = GUID$("{2373A435-6A4B-429E-A6AC-D4231A61975B}")
$IID_ISpGrammarBuilder = GUID$("{8137828F-591A-4A42-BE58-49EA7EBAAC68}")
$IID_ISpGrammarBuilder2 = GUID$("{8AB10026-20CC-4B20-8C22-A49C9BA78F60}")
$IID_ISpLexicon = GUID$("{DA41A7C2-5383-4DB2-916B-6C1719E3DB58}")
$IID_ISpMMSysAudio = GUID$("{15806F6E-1D70-4B48-98E6-3B1A007509AB}")
$IID_ISpNotifySink = GUID$("{259684DC-37C3-11D2-9603-00C04F8EE628}")
$IID_ISpNotifySource = GUID$("{5EFF4AEF-8487-11D2-961C-00C04F8EE628}")
$IID_ISpNotifyTranslator = GUID$("{ACA16614-5D3D-11D2-960E-00C04F8EE628}")
$IID_ISpObjectToken = GUID$("{14056589-E16C-11D2-BB90-00C04F8EE6C0}")
$IID_ISpObjectTokenCategory = GUID$("{2D3D3845-39AF-4850-BBF9-40B49780011D}")
$IID_ISpObjectTokenInit = GUID$("{B8AAB0CF-346F-49D8-9499-C8B03F161D51}")
$IID_ISpObjectWithToken = GUID$("{5B559F40-E952-11D2-BB91-00C04F8EE6C0}")
$IID_ISpPhoneConverter = GUID$("{8445C581-0CAC-4A38-ABFE-9B2CE2826455}")
$IID_ISpPhoneticAlphabetConverter = GUID$("{133ADCD4-19B4-4020-9FDC-842E78253B17}")
$IID_ISpPhoneticAlphabetSelection = GUID$("{B2745EFD-42CE-48CA-81F1-A96E02538A90}")
$IID_ISpPhrase = GUID$("{1A5C0354-B621-4B5A-8791-D306ED379E53}")
$IID_ISpPhrase2 = GUID$("{F264DA52-E457-4696-B856-A737B717AF79}")
$IID_ISpPhraseAlt = GUID$("{8FCEBC98-4E49-4067-9C6C-D86A0E092E3D}")
$IID_ISpProperties = GUID$("{5B4FB971-B115-4DE1-AD97-E482E3BF6EE4}")
$IID_ISpRecoCategory = GUID$("{DA0CD0F9-14A2-4F09-8C2A-85CC48979345}")
$IID_ISpRecoContext = GUID$("{F740A62F-7C15-489E-8234-940A33D9272D}")
$IID_ISpRecoContext2 = GUID$("{BEAD311C-52FF-437F-9464-6B21054CA73D}")
$IID_ISpRecognizer = GUID$("{C2B5F241-DAA0-4507-9E16-5A1EAA2B7A5C}")
$IID_ISpRecognizer2 = GUID$("{8FC6D974-C81E-4098-93C5-0147F61ED4D3}")
$IID_ISpRecognizer3 = GUID$("{DF1B943C-5838-4AA2-8706-D7CD5B333499}")
$IID_ISpRecoGrammar = GUID$("{2177DB29-7F45-47D0-8554-067E91C80502}")
$IID_ISpRecoGrammar2 = GUID$("{4B37BC9E-9ED6-44A3-93D3-18F022B79EC3}")
$IID_ISpRecoResult = GUID$("{20B053BE-E235-43CD-9A2A-8D17A48B7842}")
$IID_ISpRecoResult2 = GUID$("{27CAC6C4-88F2-41F2-8817-0C95E59F1E6E}")
$IID_ISpRegDataKey = GUID$("{92A66E2B-C830-4149-83DF-6FC2BA1E7A5B}")
$IID_ISpResourceManager = GUID$("{93384E18-5014-43D5-ADBB-A78E055926BD}")
$IID_ISpSerializeState = GUID$("{21B501A0-0EC7-46C9-92C3-A2BC784C54B9}")
$IID_ISpShortcut = GUID$("{3DF681E2-EA56-11D9-8BDE-F66BAD1E3F3A}")
$IID_ISpStream = GUID$("{12E3CCA9-7518-44C5-A5E7-BA5A79CB929E}")
$IID_ISpStreamFormat = GUID$("{BED530BE-2606-4F4D-A1C0-54C5CDA5566F}")
$IID_ISpStreamFormatConverter = GUID$("{678A932C-EA71-4446-9B41-78FDA6280A29}")
$IID_ISpTranscript = GUID$("{10F63BCE-201A-11D3-AC70-00C04F8EE6C0}")
$IID_ISpVoice = GUID$("{6C44DF74-72B9-4992-A1EC-EF996E0422D4}")
$IID_ISpXMLRecoResult = GUID$("{AE39362B-45A8-4074-9B9E-CCF49AA2D0B6}")
$IID__ISpeechRecoContextEvents = GUID$("{7B8FCB42-0E9D-4F00-A048-7B04D6179D3D}")
$IID__ISpeechVoiceEvents = GUID$("{A372ACD1-3BEF-4BBD-8FFB-CB3E2B416AF8}")
' enum SPDATAKEYLOCATION
%EQUATE `SPDKL_DefaultLocation = 0
%EQUATE `SPDKL_CurrentUser = 1
%EQUATE `SPDKL_LocalMachine = 2
%EQUATE `SPDKL_CurrentConfig = 5
$$SPDUI_EngineProperties = "EngineProperties"$$
$$SPDUI_AddRemoveWord = "AddRemoveWord"$$
$$SPDUI_UserTraining = "UserTraining"$$
$$SPDUI_MicTraining = "MicTraining"$$
$$SPDUI_RecoProfileProperties = "RecoProfileProperties"$$
$$SPDUI_AudioProperties = "AudioProperties"$$
$$SPDUI_AudioVolume = "AudioVolume"$$
$$SPDUI_UserEnrollment = "UserEnrollment"$$
$$SPDUI_ShareData = "ShareData"$$
$$SPDUI_Tutorial = "Tutorial"$$
' enum SPSTREAMFORMAT
%EQUATE `SPSF_Default = -1
%EQUATE `SPSF_NoAssignedFormat = 0
%EQUATE `SPSF_Text = %SPSF_NoAssignedFormat + 1
%EQUATE `SPSF_NonStandardFormat = %SPSF_Text + 1
%EQUATE `SPSF_ExtendedAudioFormat = %SPSF_NonStandardFormat + 1
%EQUATE `SPSF_8kHz8BitMono = %SPSF_ExtendedAudioFormat + 1
%EQUATE `SPSF_8kHz8BitStereo = %SPSF_8kHz8BitMono + 1
%EQUATE `SPSF_8kHz16BitMono = %SPSF_8kHz8BitStereo + 1
%EQUATE `SPSF_8kHz16BitStereo = %SPSF_8kHz16BitMono + 1
%EQUATE `SPSF_11kHz8BitMono = %SPSF_8kHz16BitStereo + 1
%EQUATE `SPSF_11kHz8BitStereo = %SPSF_11kHz8BitMono + 1
%EQUATE `SPSF_11kHz16BitMono = %SPSF_11kHz8BitStereo + 1
%EQUATE `SPSF_11kHz16BitStereo = %SPSF_11kHz16BitMono + 1
%EQUATE `SPSF_12kHz8BitMono = %SPSF_11kHz16BitStereo + 1
%EQUATE `SPSF_12kHz8BitStereo = %SPSF_12kHz8BitMono + 1
%EQUATE `SPSF_12kHz16BitMono = %SPSF_12kHz8BitStereo + 1
%EQUATE `SPSF_12kHz16BitStereo = %SPSF_12kHz16BitMono + 1
%EQUATE `SPSF_16kHz8BitMono = %SPSF_12kHz16BitStereo + 1
%EQUATE `SPSF_16kHz8BitStereo = %SPSF_16kHz8BitMono + 1
%EQUATE `SPSF_16kHz16BitMono = %SPSF_16kHz8BitStereo + 1
%EQUATE `SPSF_16kHz16BitStereo = %SPSF_16kHz16BitMono + 1
%EQUATE `SPSF_22kHz8BitMono = %SPSF_16kHz16BitStereo + 1
%EQUATE `SPSF_22kHz8BitStereo = %SPSF_22kHz8BitMono + 1
%EQUATE `SPSF_22kHz16BitMono = %SPSF_22kHz8BitStereo + 1
%EQUATE `SPSF_22kHz16BitStereo = %SPSF_22kHz16BitMono + 1
%EQUATE `SPSF_24kHz8BitMono = %SPSF_22kHz16BitStereo + 1
%EQUATE `SPSF_24kHz8BitStereo = %SPSF_24kHz8BitMono + 1
%EQUATE `SPSF_24kHz16BitMono = %SPSF_24kHz8BitStereo + 1
%EQUATE `SPSF_24kHz16BitStereo = %SPSF_24kHz16BitMono + 1
%EQUATE `SPSF_32kHz8BitMono = %SPSF_24kHz16BitStereo + 1
%EQUATE `SPSF_32kHz8BitStereo = %SPSF_32kHz8BitMono + 1
%EQUATE `SPSF_32kHz16BitMono = %SPSF_32kHz8BitStereo + 1
%EQUATE `SPSF_32kHz16BitStereo = %SPSF_32kHz16BitMono + 1
%EQUATE `SPSF_44kHz8BitMono = %SPSF_32kHz16BitStereo + 1
%EQUATE `SPSF_44kHz8BitStereo = %SPSF_44kHz8BitMono + 1
%EQUATE `SPSF_44kHz16BitMono = %SPSF_44kHz8BitStereo + 1
%EQUATE `SPSF_44kHz16BitStereo = %SPSF_44kHz16BitMono + 1
%EQUATE `SPSF_48kHz8BitMono = %SPSF_44kHz16BitStereo + 1
%EQUATE `SPSF_48kHz8BitStereo = %SPSF_48kHz8BitMono + 1
%EQUATE `SPSF_48kHz16BitMono = %SPSF_48kHz8BitStereo + 1
%EQUATE `SPSF_48kHz16BitStereo = %SPSF_48kHz16BitMono + 1
%EQUATE `SPSF_TrueSpeech_8kHz1BitMono = %SPSF_48kHz16BitStereo + 1
%EQUATE `SPSF_CCITT_ALaw_8kHzMono = %SPSF_TrueSpeech_8kHz1BitMono + 1
%EQUATE `SPSF_CCITT_ALaw_8kHzStereo = %SPSF_CCITT_ALaw_8kHzMono + 1
%EQUATE `SPSF_CCITT_ALaw_11kHzMono = %SPSF_CCITT_ALaw_8kHzStereo + 1
%EQUATE `SPSF_CCITT_ALaw_11kHzStereo = %SPSF_CCITT_ALaw_11kHzMono + 1
%EQUATE `SPSF_CCITT_ALaw_22kHzMono = %SPSF_CCITT_ALaw_11kHzStereo + 1
%EQUATE `SPSF_CCITT_ALaw_22kHzStereo = %SPSF_CCITT_ALaw_22kHzMono + 1
%EQUATE `SPSF_CCITT_ALaw_44kHzMono = %SPSF_CCITT_ALaw_22kHzStereo + 1
%EQUATE `SPSF_CCITT_ALaw_44kHzStereo = %SPSF_CCITT_ALaw_44kHzMono + 1
%EQUATE `SPSF_CCITT_uLaw_8kHzMono = %SPSF_CCITT_ALaw_44kHzStereo + 1
%EQUATE `SPSF_CCITT_uLaw_8kHzStereo = %SPSF_CCITT_uLaw_8kHzMono + 1
%EQUATE `SPSF_CCITT_uLaw_11kHzMono = %SPSF_CCITT_uLaw_8kHzStereo + 1
%EQUATE `SPSF_CCITT_uLaw_11kHzStereo = %SPSF_CCITT_uLaw_11kHzMono + 1
%EQUATE `SPSF_CCITT_uLaw_22kHzMono = %SPSF_CCITT_uLaw_11kHzStereo + 1
%EQUATE `SPSF_CCITT_uLaw_22kHzStereo = %SPSF_CCITT_uLaw_22kHzMono + 1
%EQUATE `SPSF_CCITT_uLaw_44kHzMono = %SPSF_CCITT_uLaw_22kHzStereo + 1
%EQUATE `SPSF_CCITT_uLaw_44kHzStereo = %SPSF_CCITT_uLaw_44kHzMono + 1
%EQUATE `SPSF_ADPCM_8kHzMono = %SPSF_CCITT_uLaw_44kHzStereo + 1
%EQUATE `SPSF_ADPCM_8kHzStereo = %SPSF_ADPCM_8kHzMono + 1
%EQUATE `SPSF_ADPCM_11kHzMono = %SPSF_ADPCM_8kHzStereo + 1
%EQUATE `SPSF_ADPCM_11kHzStereo = %SPSF_ADPCM_11kHzMono + 1
%EQUATE `SPSF_ADPCM_22kHzMono = %SPSF_ADPCM_11kHzStereo + 1
%EQUATE `SPSF_ADPCM_22kHzStereo = %SPSF_ADPCM_22kHzMono + 1
%EQUATE `SPSF_ADPCM_44kHzMono = %SPSF_ADPCM_22kHzStereo + 1
%EQUATE `SPSF_ADPCM_44kHzStereo = %SPSF_ADPCM_44kHzMono + 1
%EQUATE `SPSF_GSM610_8kHzMono = %SPSF_ADPCM_44kHzStereo + 1
%EQUATE `SPSF_GSM610_11kHzMono = %SPSF_GSM610_8kHzMono + 1
%EQUATE `SPSF_GSM610_22kHzMono = %SPSF_GSM610_11kHzMono + 1
%EQUATE `SPSF_GSM610_44kHzMono = %SPSF_GSM610_22kHzMono + 1
%EQUATE `SPSF_NUM_FORMATS = %SPSF_GSM610_44kHzMono + 1
'EXTERN_C const GUID SPDFID_Text;
'EXTERN_C const GUID SPDFID_WaveFormatEx;
' Must be used as unicode
$$SPREG_USER_ROOT = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech"$$
$$SPREG_LOCAL_MACHINE_ROOT = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech"$$
$$SPCAT_AUDIOOUT = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioOutput"$$
$$SPCAT_AUDIOIN = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioInput"$$
$$SPCAT_VOICES = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices"$$
$$SPCAT_RECOGNIZERS = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Recognizers"$$
$$SPCAT_APPLEXICONS = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AppLexicons"$$
$$SPCAT_PHONECONVERTERS = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\PhoneConverters"$$
$$SPCAT_RECOPROFILES = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech\RecoProfiles"$$
$$SPMMSYS_AUDIO_IN_TOKEN_ID = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioInput\TokenEnums\MMAudioIn\"$$
$$SPMMSYS_AUDIO_OUT_TOKEN_ID = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioOutput\TokenEnums\MMAudioOut\"$$
$$SPCURRENT_USER_LEXICON_TOKEN_ID = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech\CurrentUserLexicon"$$
$$SPCURRENT_USER_SHORTCUT_TOKEN_ID = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech\CurrentUserShortcut"$$
$$SPTOKENVALUE_CLSID = "CLSID"$$
$$SPTOKENKEY_FILES = "Files"$$
$$SPTOKENKEY_UI = "UI"$$
$$SPTOKENKEY_ATTRIBUTES = "Attributes"$$
$$SPTOKENKEY_RETAINEDAUDIO = "SecondsPerRetainedAudioEvent"$$
$$SPVOICECATEGORY_TTSRATE = "DefaultTTSRate"$$
$$SPPROP_RESOURCE_USAGE = "ResourceUsage"$$
$$SPPROP_HIGH_CONFIDENCE_THRESHOLD = "HighConfidenceThreshold"$$
$$SPPROP_NORMAL_CONFIDENCE_THRESHOLD = "NormalConfidenceThreshold"$$
$$SPPROP_LOW_CONFIDENCE_THRESHOLD = "LowConfidenceThreshold"$$
$$SPPROP_RESPONSE_SPEED = "ResponseSpeed"$$
$$SPPROP_COMPLEX_RESPONSE_SPEED = "ComplexResponseSpeed"$$
$$SPPROP_ADAPTATION_ON = "AdaptationOn"$$
$$SPPROP_PERSISTED_BACKGROUND_ADAPTATION = "PersistedBackgroundAdaptation"$$
$$SPPROP_PERSISTED_LANGUAGE_MODEL_ADAPTATION = "PersistedLanguageModelAdaptation"$$
$$SPPROP_UX_IS_LISTENING = "UXIsListening"$$
$$SPTOPIC_SPELLING = "Spelling"$$
$$SPWILDCARD = "..."$$
$$SPDICTATION = "*"$$
$$SPINFDICTATION = "*+"$$
$$SPREG_SAFE_USER_TOKENS = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\UserTokens"$$
%EQUATE `SP_LOW_CONFIDENCE = -1
%EQUATE `SP_NORMAL_CONFIDENCE = 0
%EQUATE `SP_HIGH_CONFIDENCE = +1
%EQUATE `DEFAULT_WEIGHT = 1
%EQUATE `SP_MAX_WORD_LENGTH = 128
%EQUATE `SP_MAX_PRON_LENGTH = 384
%EQUATE `SP_EMULATE_RESULT = &H40000000
'typedef void __stdcall SPNOTIFYCALLBACK(WPARAM wParam, LPARAM lParam);
'SUB SPNOTIFYCALLBACK (BYVAL wParam AS DWORD, BYVAL lParam AS LONG)
' ########################################################################################
' Interface name = ISpNotifySource
' IID = {5EFF4AEF-8487-11D2-961C-00C04F8EE628}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpNotifySource_INTERFACE_DEFINED)
 %ISpNotifySource_INTERFACE_DEFINED = 1
INTERFACE ISpNotifySource $IID_ISpNotifySource
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetNotifySink ( ' VTable offset = 12
 BYVAL pNotifySink AS ISpNotifySink
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyWindowMessage ( ' VTable offset = 16
 BYVAL hWnd AS DWORD
 , BYVAL Msg AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyCallbackFunction ( ' VTable offset = 20
 BYVAL pfnCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyCallbackInterface ( ' VTable offset = 24
 BYVAL pSpCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyWin32Event ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD WaitForNotifyEvent ( ' VTable offset = 32
 BYVAL dwMilliseconds AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNotifyEventHandle ( ' VTable offset = 36
 ) AS DWORD
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpNotifySource_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpNotifySink
' IID = {259684DC-37C3-11D2-9603-00C04F8EE628}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpNotifySink_INTERFACE_DEFINED)
 %ISpNotifySink_INTERFACE_DEFINED = 1
INTERFACE ISpNotifySink $IID_ISpNotifySink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Notify ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpNotifySink_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpNotifyTranslator
' IID = {ACA16614-5D3D-11D2-960E-00C04F8EE628}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpNotifySink
' ########################################################################################
#IF NOT %DEF(%ISpNotifyTranslator_INTERFACE_DEFINED)
 %ISpNotifyTranslator_INTERFACE_DEFINED = 1
INTERFACE ISpNotifyTranslator $IID_ISpNotifyTranslator
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpNotifySink Methods
 ' =====================================================================================
 METHOD Notify ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpNotifyTranslator Methods
 ' =====================================================================================
 METHOD InitWindowMessage ( ' VTable offset = 16
 BYVAL hWnd AS DWORD
 , BYVAL Msg AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD InitCallback ( ' VTable offset = 20
 BYVAL pfnCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD InitSpNotifyCallback ( ' VTable offset = 24
 BYVAL pSpCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD InitWin32Event ( ' VTable offset = 28
 BYVAL hEvent AS DWORD
 , BYVAL fCloseHandleOnRelease AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Wait ( ' VTable offset = 32
 BYVAL dwMilliseconds AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetEventHandle ( ' VTable offset = 36
 ) AS DWORD
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpNotifyTranslator_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpDataKey
' IID = {14056581-E16C-11D2-BB90-00C04F8EE6C0}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpDataKey_INTERFACE_DEFINED)
 %ISpDataKey_INTERFACE_DEFINED = 1
INTERFACE ISpDataKey $IID_ISpDataKey
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetData ( ' VTable offset = 12
 BYREF pszValueName AS WSTRINGZ
 , BYVAL cbData AS DWORD
 , BYVAL pData AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD GetData ( ' VTable offset = 16
 BYREF pszValueName AS WSTRINGZ
 , BYREF pcbData AS DWORD
 , BYVAL pData AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD SetStringValue ( ' VTable offset = 20
 BYREF pszValueName AS WSTRINGZ
 , BYREF pszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringValue ( ' VTable offset = 24
 BYREF pszValueName AS WSTRINGZ
 , BYREF ppszValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDWORD ( ' VTable offset = 28
 BYREF pszValueName AS WSTRINGZ
 , BYVAL dwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDWORD ( ' VTable offset = 32
 BYREF pszValueName AS WSTRINGZ
 , BYREF pdwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OpenKey ( ' VTable offset = 36
 BYREF pszSubKeyName AS WSTRINGZ
 , BYREF ppSubKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD CreateKey ( ' VTable offset = 40
 BYREF pszSubKey AS WSTRINGZ
 , BYREF ppSubKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteKey ( ' VTable offset = 44
 BYREF pszSubKey AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteValue ( ' VTable offset = 48
 BYREF pszValueName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD EnumKeys ( ' VTable offset = 52
 BYVAL Index AS DWORD
 , BYREF ppszSubKeyName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumValues ( ' VTable offset = 56
 BYVAL Index AS DWORD
 , BYREF ppszValueName AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpDataKey_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpRegDataKey
' IID = {92A66E2B-C830-4149-83DF-6FC2BA1E7A5B}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpDataKey
' ########################################################################################
#IF NOT %DEF(%ISpRegDataKey_INTERFACE_DEFINED)
 %ISpRegDataKey_INTERFACE_DEFINED = 1
INTERFACE ISpRegDataKey $IID_ISpRegDataKey
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpDataKey methods
 ' =====================================================================================
 METHOD SetData ( ' VTable offset = 12
 BYREF pszValueName AS WSTRINGZ
 , BYVAL cbData AS DWORD
 , BYVAL pData AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD GetData ( ' VTable offset = 16
 BYREF pszValueName AS WSTRINGZ
 , BYREF pcbData AS DWORD
 , BYVAL pData AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD SetStringValue ( ' VTable offset = 20
 BYREF pszValueName AS WSTRINGZ
 , BYREF pszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringValue ( ' VTable offset = 24
 BYREF pszValueName AS WSTRINGZ
 , BYREF ppszValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDWORD ( ' VTable offset = 28
 BYREF pszValueName AS WSTRINGZ
 , BYVAL dwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDWORD ( ' VTable offset = 32
 BYREF pszValueName AS WSTRINGZ
 , BYREF pdwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OpenKey ( ' VTable offset = 36
 BYREF pszSubKeyName AS WSTRINGZ
 , BYREF ppSubKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD CreateKey ( ' VTable offset = 40
 BYREF pszSubKey AS WSTRINGZ
 , BYREF ppSubKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteKey ( ' VTable offset = 44
 BYREF pszSubKey AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteValue ( ' VTable offset = 48
 BYREF pszValueName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD EnumKeys ( ' VTable offset = 52
 BYVAL Index AS DWORD
 , BYREF ppszSubKeyName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumValues ( ' VTable offset = 56
 BYVAL Index AS DWORD
 , BYREF ppszValueName AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpRegDataKey method
 ' =====================================================================================
 METHOD SetKey ( ' VTable offset = 60
 BYVAL hkey AS DWORD
 , BYVAL fReadOnly AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRegDataKey_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpObjectTokenCategory
' IID = {2D3D3845-39AF-4850-BBF9-40B49780011D}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpDataKey
' ########################################################################################
#IF NOT %DEF(%ISpObjectTokenCategory_INTERFACE_DEFINED)
 %ISpObjectTokenCategory_INTERFACE_DEFINED = 1
INTERFACE ISpObjectTokenCategory $IID_ISpObjectTokenCategory
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpDataKey methods
 ' =====================================================================================
 METHOD SetData ( ' VTable offset = 12
 BYREF pszValueName AS WSTRINGZ
 , BYVAL cbData AS DWORD
 , BYVAL pData AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD GetData ( ' VTable offset = 16
 BYREF pszValueName AS WSTRINGZ
 , BYREF pcbData AS DWORD
 , BYVAL pData AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD SetStringValue ( ' VTable offset = 20
 BYREF pszValueName AS WSTRINGZ
 , BYREF pszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringValue ( ' VTable offset = 24
 BYREF pszValueName AS WSTRINGZ
 , BYREF ppszValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDWORD ( ' VTable offset = 28
 BYREF pszValueName AS WSTRINGZ
 , BYVAL dwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDWORD ( ' VTable offset = 32
 BYREF pszValueName AS WSTRINGZ
 , BYREF pdwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OpenKey ( ' VTable offset = 36
 BYREF pszSubKeyName AS WSTRINGZ
 , BYREF ppSubKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD CreateKey ( ' VTable offset = 40
 BYREF pszSubKey AS WSTRINGZ
 , BYREF ppSubKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteKey ( ' VTable offset = 44
 BYREF pszSubKey AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteValue ( ' VTable offset = 48
 BYREF pszValueName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD EnumKeys ( ' VTable offset = 52
 BYVAL Index AS DWORD
 , BYREF ppszSubKeyName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumValues ( ' VTable offset = 56
 BYVAL Index AS DWORD
 , BYREF ppszValueName AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpObjectTokenCategory methods
 ' =====================================================================================
 METHOD SetId ( ' VTable offset = 60
 BYREF pszCategoryId AS WSTRINGZ
 , BYVAL fCreateIfNotExist AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetId ( ' VTable offset = 64
 BYREF ppszCoMemCategoryId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDataKey ( ' VTable offset = 68
 BYVAL spdkl AS LONG
 , BYREF ppDataKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD EnumTokens ( ' VTable offset = 72
 BYREF pzsReqAttribs AS WSTRINGZ
 , BYREF pszOptAttribs AS WSTRINGZ
 , BYREF ppEnum AS IEnumSpObjectTokens
 ) AS LONG
 ' =====================================================================================
 METHOD SetDefaultTokenId ( ' VTable offset = 76
 BYREF pszTokenId AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetDefaultTokenId ( ' VTable offset = 80
 BYREF ppszCoMemTokenId AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpObjectTokenCategory_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpObjectToken
' IID = {14056589-E16C-11D2-BB90-00C04F8EE6C0}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpDataKey
' ########################################################################################
#IF NOT %DEF(%ISpObjectToken_INTERFACE_DEFINED)
 %ISpObjectToken_INTERFACE_DEFINED = 1
INTERFACE ISpObjectToken $IID_ISpObjectToken
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpDataKey methods
 ' =====================================================================================
 METHOD SetData ( ' VTable offset = 12
 BYREF pszValueName AS WSTRINGZ
 , BYVAL cbData AS DWORD
 , BYVAL pData AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD GetData ( ' VTable offset = 16
 BYREF pszValueName AS WSTRINGZ
 , BYREF pcbData AS DWORD
 , BYVAL pData AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD SetStringValue ( ' VTable offset = 20
 BYREF pszValueName AS WSTRINGZ
 , BYREF pszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringValue ( ' VTable offset = 24
 BYREF pszValueName AS WSTRINGZ
 , BYREF ppszValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDWORD ( ' VTable offset = 28
 BYREF pszValueName AS WSTRINGZ
 , BYVAL dwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDWORD ( ' VTable offset = 32
 BYREF pszValueName AS WSTRINGZ
 , BYREF pdwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OpenKey ( ' VTable offset = 36
 BYREF pszSubKeyName AS WSTRINGZ
 , BYREF ppSubKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD CreateKey ( ' VTable offset = 40
 BYREF pszSubKey AS WSTRINGZ
 , BYREF ppSubKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteKey ( ' VTable offset = 44
 BYREF pszSubKey AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteValue ( ' VTable offset = 48
 BYREF pszValueName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD EnumKeys ( ' VTable offset = 52
 BYVAL Index AS DWORD
 , BYREF ppszSubKeyName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumValues ( ' VTable offset = 56
 BYVAL Index AS DWORD
 , BYREF ppszValueName AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpObjectToken methods
 ' =====================================================================================
 METHOD SetId ( ' VTable offset = 60
 BYREF pszCategoryId AS WSTRINGZ
 , BYREF pszTokenId AS WSTRINGZ
 , BYVAL fCreateIfNotExist AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetId ( ' VTable offset = 64
 BYREF ppszCoMemTokenId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCategory ( ' VTable offset = 68
 BYREF ppTokenCategory AS ISpObjectTokenCategory
 ) AS LONG
 ' =====================================================================================
 METHOD CreateInstance ( ' VTable offset = 72
 BYVAL pUnkOuter AS IUnknown
 , BYVAL dwClsContext AS DWORD
 , BYREF riid AS GUID
 , BYREF ppvObject AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStorageFileName ( ' VTable offset = 76
 BYREF clsidCaller AS GUID
 , BYREF pszValueName AS WSTRINGZ
 , BYREF pszFileNameSpecifier AS WSTRINGZ
 , BYVAL nFolder AS DWORD
 , BYREF ppszFilePath AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveStorageFileName ( ' VTable offset = 80
 BYREF clsidCaller AS GUID
 , BYREF pszKeyName AS WSTRINGZ
 , BYVAL fDeleteFile AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Remove ( ' VTable offset = 84
 BYREF pclsidCaller AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD IsUISupported ( ' VTable offset = 88
 BYREF pszTypeOfUI AS WSTRINGZ
 , BYVAL pvExtraData AS DWORD
 , BYVAL cbExtraData AS DWORD
 , BYVAL punkObject AS IUnknown
 , BYREF pfSupported AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD DisplayUI ( ' VTable offset = 92
 BYVAL hwndParent AS DWORD
 , BYREF pszTitle AS WSTRINGZ
 , BYREF pszTypeOfUI AS WSTRINGZ
 , BYVAL pvExtraData AS DWORD PTR
 , BYVAL cbExtraData AS DWORD
 , BYVAL punkObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD MatchesAttributes ( ' VTable offset = 96
 BYREF pszAttributes AS WSTRINGZ
 , BYREF pfMatches AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpObjectToken_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpObjectTokenInit
' IID = {B8AAB0CF-346F-49D8-9499-C8B03F161D51}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpObjectToken
' ########################################################################################
#IF NOT %DEF(%ISpObjectTokenInit_INTERFACE_DEFINED)
 %ISpObjectTokenInit_INTERFACE_DEFINED = 1
INTERFACE ISpObjectTokenInit $IID_ISpObjectTokenInit
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpDataKey methods
 ' =====================================================================================
 METHOD SetData ( ' VTable offset = 12
 BYREF pszValueName AS WSTRINGZ
 , BYVAL cbData AS DWORD
 , BYVAL pData AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD GetData ( ' VTable offset = 16
 BYREF pszValueName AS WSTRINGZ
 , BYREF pcbData AS DWORD
 , BYVAL pData AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD SetStringValue ( ' VTable offset = 20
 BYREF pszValueName AS WSTRINGZ
 , BYREF pszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringValue ( ' VTable offset = 24
 BYREF pszValueName AS WSTRINGZ
 , BYREF ppszValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDWORD ( ' VTable offset = 28
 BYREF pszValueName AS WSTRINGZ
 , BYVAL dwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDWORD ( ' VTable offset = 32
 BYREF pszValueName AS WSTRINGZ
 , BYREF pdwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OpenKey ( ' VTable offset = 36
 BYREF pszSubKeyName AS WSTRINGZ
 , BYREF ppSubKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD CreateKey ( ' VTable offset = 40
 BYREF pszSubKey AS WSTRINGZ
 , BYREF ppSubKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteKey ( ' VTable offset = 44
 BYREF pszSubKey AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteValue ( ' VTable offset = 48
 BYREF pszValueName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD EnumKeys ( ' VTable offset = 52
 BYVAL Index AS DWORD
 , BYREF ppszSubKeyName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumValues ( ' VTable offset = 56
 BYVAL Index AS DWORD
 , BYREF ppszValueName AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpObjectToken methods
 ' =====================================================================================
 METHOD SetId ( ' VTable offset = 60
 BYREF pszCategoryId AS WSTRINGZ
 , BYREF pszTokenId AS WSTRINGZ
 , BYVAL fCreateIfNotExist AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetId ( ' VTable offset = 64
 BYREF ppszCoMemTokenId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCategory ( ' VTable offset = 68
 BYREF ppTokenCategory AS ISpObjectTokenCategory
 ) AS LONG
 ' =====================================================================================
 METHOD CreateInstance ( ' VTable offset = 72
 BYVAL pUnkOuter AS IUnknown
 , BYVAL dwClsContext AS DWORD
 , BYREF riid AS GUID
 , BYREF ppvObject AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStorageFileName ( ' VTable offset = 76
 BYREF clsidCaller AS GUID
 , BYREF pszValueName AS WSTRINGZ
 , BYREF pszFileNameSpecifier AS WSTRINGZ
 , BYVAL nFolder AS DWORD
 , BYREF ppszFilePath AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveStorageFileName ( ' VTable offset = 80
 BYREF clsidCaller AS GUID
 , BYREF pszKeyName AS WSTRINGZ
 , BYVAL fDeleteFile AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Remove ( ' VTable offset = 84
 BYREF pclsidCaller AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD IsUISupported ( ' VTable offset = 88
 BYREF pszTypeOfUI AS WSTRINGZ
 , BYVAL pvExtraData AS DWORD
 , BYVAL cbExtraData AS DWORD
 , BYVAL punkObject AS IUnknown
 , BYREF pfSupported AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD DisplayUI ( ' VTable offset = 92
 BYVAL hwndParent AS DWORD
 , BYREF pszTitle AS WSTRINGZ
 , BYREF pszTypeOfUI AS WSTRINGZ
 , BYVAL pvExtraData AS DWORD PTR
 , BYVAL cbExtraData AS DWORD
 , BYVAL punkObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD MatchesAttributes ( ' VTable offset = 96
 BYREF pszAttributes AS WSTRINGZ
 , BYREF pfMatches AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpObjectTokenInit methods
 ' =====================================================================================
 METHOD InitFromDataKey ( ' VTable offset = 100
 BYREF pszCategoryId AS WSTRINGZ
 , BYREF pszTokenId AS WSTRINGZ
 , BYVAL pDataKey AS ISpDataKey
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpObjectTokenInit_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IEnumSpObjectTokens
' IID = {06B64F9E-7FDA-11D2-B4F2-00C04F797396}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IEnumSpObjectTokens_INTERFACE_DEFINED)
 %IEnumSpObjectTokens_INTERFACE_DEFINED = 1
INTERFACE IEnumSpObjectTokens $IID_IEnumSpObjectTokens
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 12
 BYVAL celt AS DWORD
 , BYREF pelt AS ISpObjectToken
 , BYREF pceltFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 16
 BYVAL celt AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 24
 BYREF ppEnum AS IEnumSpObjectTokens
 ) AS LONG
 ' =====================================================================================
 METHOD Item ( ' VTable offset = 28
 BYVAL Index AS DWORD
 , BYREF ppToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 32
 BYREF pCount AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEnumSpObjectTokens_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpObjectWithToken
' IID = {5B559F40-E952-11D2-BB91-00C04F8EE6C0}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpObjectWithToken_INTERFACE_DEFINED)
 %ISpObjectWithToken_INTERFACE_DEFINED = 1
INTERFACE ISpObjectWithToken $IID_ISpObjectWithToken
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetObjectToken ( ' VTable offset = 12
 BYVAL pToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD GetObjectToken ( ' VTable offset = 16
 BYREF ppToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpObjectWithToken_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpResourceManager
' IID = {93384E18-5014-43D5-ADBB-A78E055926BD}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IServiceProvider
' ########################################################################################
#IF NOT %DEF(%ISpResourceManager_INTERFACE_DEFINED)
 %ISpResourceManager_INTERFACE_DEFINED = 1
INTERFACE ISpResourceManager $IID_ISpResourceManager
 INHERIT IUnknown
 ' =====================================================================================
 ' IServiceProvider methods
 ' =====================================================================================
 METHOD QueryService ( ' VTable offset = 12
 BYREF guidService AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpResourceManager Methods
 ' =====================================================================================
 METHOD SetObject ( ' VTable offset = 16
 BYREF guidServiceId AS GUID
 , BYVAL pUnkObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD GetObject ( ' VTable offset = 20
 BYREF guidServiceId AS GUID
 , BYREF ObjectCLSID AS GUID
 , BYREF ObjectIID AS GUID
 , BYVAL fReleaseWhenLastExternalRefReleased AS LONG
 , BYREF ppObject AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpResourceManager_INTERFACE_DEFINED__ */
' enum SPEVENTLPARAMTYPE
%EQUATE `SPET_LPARAM_IS_UNDEFINED = 0
%EQUATE `SPET_LPARAM_IS_TOKEN = %SPET_LPARAM_IS_UNDEFINED + 1
%EQUATE `SPET_LPARAM_IS_OBJECT = %SPET_LPARAM_IS_TOKEN + 1
%EQUATE `SPET_LPARAM_IS_POINTER = %SPET_LPARAM_IS_OBJECT + 1
%EQUATE `SPET_LPARAM_IS_STRING = %SPET_LPARAM_IS_POINTER + 1
' enum SPEVENTENUM
%EQUATE `SPEI_UNDEFINED = 0
%EQUATE `SPEI_START_INPUT_STREAM = 1
%EQUATE `SPEI_END_INPUT_STREAM = 2
%EQUATE `SPEI_VOICE_CHANGE = 3
%EQUATE `SPEI_TTS_BOOKMARK = 4
%EQUATE `SPEI_WORD_BOUNDARY = 5
%EQUATE `SPEI_PHONEME = 6
%EQUATE `SPEI_SENTENCE_BOUNDARY = 7
%EQUATE `SPEI_VISEME = 8
%EQUATE `SPEI_TTS_AUDIO_LEVEL = 9
%EQUATE `SPEI_TTS_PRIVATE = 15
%EQUATE `SPEI_MIN_TTS = 1
%EQUATE `SPEI_MAX_TTS = 15
%EQUATE `SPEI_END_SR_STREAM = 34
%EQUATE `SPEI_SOUND_START = 35
%EQUATE `SPEI_SOUND_END = 36
%EQUATE `SPEI_PHRASE_START = 37
%EQUATE `SPEI_RECOGNITION = 38
%EQUATE `SPEI_HYPOTHESIS = 39
%EQUATE `SPEI_SR_BOOKMARK = 40
%EQUATE `SPEI_PROPERTY_NUM_CHANGE = 41
%EQUATE `SPEI_PROPERTY_STRING_CHANGE = 42
%EQUATE `SPEI_FALSE_RECOGNITION = 43
%EQUATE `SPEI_INTERFERENCE = 44
%EQUATE `SPEI_REQUEST_UI = 45
%EQUATE `SPEI_RECO_STATE_CHANGE = 46
%EQUATE `SPEI_ADAPTATION = 47
%EQUATE `SPEI_START_SR_STREAM = 48
%EQUATE `SPEI_RECO_OTHER_CONTEXT = 49
%EQUATE `SPEI_SR_AUDIO_LEVEL = 50
%EQUATE `SPEI_SR_RETAINEDAUDIO = 51
%EQUATE `SPEI_SR_PRIVATE = 52
%EQUATE `SPEI_ACTIVE_CATEGORY_CHANGED = 53
%EQUATE `SPEI_RESERVED5 = 54
%EQUATE `SPEI_RESERVED6 = 55
%EQUATE `SPEI_MIN_SR = 34
%EQUATE `SPEI_MAX_SR = 55
%EQUATE `SPEI_RESERVED1 = 30
%EQUATE `SPEI_RESERVED2 = 33
%EQUATE `SPEI_RESERVED3 = 63
'#define SPFEI_FLAGCHECK ( (1ui64 << SPEI_RESERVED1) | (1ui64 << SPEI_RESERVED2) )
'#define SPFEI_ALL_TTS_EVENTS (0x000000000000FFFEui64 | SPFEI_FLAGCHECK)
'#define SPFEI_ALL_SR_EVENTS (0x001FFFFC00000000ui64 | SPFEI_FLAGCHECK)
'#define SPFEI_ALL_EVENTS 0xEFFFFFFFFFFFFFFFui64
'#define SPFEI(SPEI_ord) ((1ui64 << SPEI_ord) | SPFEI_FLAGCHECK)
%EQUATE `SPFEI_FLAGCHECK = 9663676416&&
%EQUATE `SPFEI_ALL_TTS_EVENTS = 9663741950&&
%EQUATE `SPFEI_ALL_SR_EVENTS = 9007191738548224&&
%EQUATE `SPFEI_ALL_EVENTS = &HEFFFFFFFFFFFFFFF&&
FUNCTION SPFEI (BYVAL SPEI_ord AS QUAD) AS QUAD
 LOCAL q AS QUAD
 q = 1
 SHIFT LEFT q, SPEI_ord
 FUNCTION = q OR %SPFEI_FLAGCHECK
END FUNCTION
' // Size = 24 bytes
TYPE SPEVENT ' Must be 8 byte aligned
 eEventId AS WORD ' SPEVENTENUM
 elParamType AS WORD ' SPEVENTLPARAMTYPE
 ulStreamNum AS DWORD ' ULONG
 ullAudioStreamOffset AS QUAD ' ULONGLONG
 wParam AS DWORD ' WPARAM
 lParam AS LONG
END TYPE
' // Size = 24 bytes
TYPE SPSERIALIZEDEVENT ' Must be 8 byte aligned
 eEventId AS WORD ' SPEVENTENUM
 elParamType AS WORD ' SPEVENTLPARAMTYPE
 ulStreamNum AS DWORD ' ULONG
 ullAudioStreamOffset AS QUAD ' ULONGLONG
 SerializedwParam AS DWORD ' ULONG
 SerializedlParam AS LONG
END TYPE
' // Size = 32 bytes
TYPE SPSERIALIZEDEVENT64 ' Must be 8 byte aligned
 eEventId AS WORD ' SPEVENTENUM
 elParamType AS WORD ' SPEVENTLPARAMTYPE
 ulStreamNum AS DWORD ' ULONG
 ullAudioStreamOffset AS QUAD ' ULONGLONG
 SerializedwParam AS QUAD ' ULONGLONG
 SerializedlParam AS QUAD ' LONGLONG
END TYPE
' // Size = 32 bytes
TYPE SPEVENTEX ' Must be 8 byte aligned
 eEventId AS BIT * 16 IN DWORD ' SPEVENTENUM
 elParamType AS BIT * 16 ' SPEVENTLPARAMTYPE
 ulStreamNum AS DWORD ' ULONG
 ullAudioStreamOffset AS QUAD ' ULONGLONG
 wParam AS DWORD ' WPARAM
 lParam AS LONG
 ullAudioTimeOffset AS QUAD ' ULONGLONG
END TYPE
' enum SPINTERFERENCE
%EQUATE `SPINTERFERENCE_NONE = 0
%EQUATE `SPINTERFERENCE_NOISE = %SPINTERFERENCE_NONE + 1
%EQUATE `SPINTERFERENCE_NOSIGNAL = %SPINTERFERENCE_NOISE + 1
%EQUATE `SPINTERFERENCE_TOOLOUD = %SPINTERFERENCE_NOSIGNAL + 1
%EQUATE `SPINTERFERENCE_TOOQUIET = %SPINTERFERENCE_TOOLOUD + 1
%EQUATE `SPINTERFERENCE_TOOFAST = %SPINTERFERENCE_TOOQUIET + 1
%EQUATE `SPINTERFERENCE_TOOSLOW = %SPINTERFERENCE_TOOFAST + 1
' enum SPENDSRSTREAMFLAGS
%EQUATE `SPESF_NONE = 0
%EQUATE `SPESF_STREAM_RELEASED = 1 ' 1 << 0
%EQUATE `SPESF_EMULATED = 2 ' 1 << 1
' enum SPVFEATURE
%EQUATE `SPVFEATURE_STRESSED = 1 ' 1L << 0
%EQUATE `SPVFEATURE_EMPHASIS = 2 ' 1L << 1
' enum SPVISEMES
%EQUATE `SP_VISEME_0 = 0
%EQUATE `SP_VISEME_1 = %SP_VISEME_0 + 1
%EQUATE `SP_VISEME_2 = %SP_VISEME_1 + 1
%EQUATE `SP_VISEME_3 = %SP_VISEME_2 + 1
%EQUATE `SP_VISEME_4 = %SP_VISEME_3 + 1
%EQUATE `SP_VISEME_5 = %SP_VISEME_4 + 1
%EQUATE `SP_VISEME_6 = %SP_VISEME_5 + 1
%EQUATE `SP_VISEME_7 = %SP_VISEME_6 + 1
%EQUATE `SP_VISEME_8 = %SP_VISEME_7 + 1
%EQUATE `SP_VISEME_9 = %SP_VISEME_8 + 1
%EQUATE `SP_VISEME_10 = %SP_VISEME_9 + 1
%EQUATE `SP_VISEME_11 = %SP_VISEME_10 + 1
%EQUATE `SP_VISEME_12 = %SP_VISEME_11 + 1
%EQUATE `SP_VISEME_13 = %SP_VISEME_12 + 1
%EQUATE `SP_VISEME_14 = %SP_VISEME_13 + 1
%EQUATE `SP_VISEME_15 = %SP_VISEME_14 + 1
%EQUATE `SP_VISEME_16 = %SP_VISEME_15 + 1
%EQUATE `SP_VISEME_17 = %SP_VISEME_16 + 1
%EQUATE `SP_VISEME_18 = %SP_VISEME_17 + 1
%EQUATE `SP_VISEME_19 = %SP_VISEME_18 + 1
%EQUATE `SP_VISEME_20 = %SP_VISEME_19 + 1
%EQUATE `SP_VISEME_21 = %SP_VISEME_20 + 1
' // Size = 24 bytes
TYPE SPEVENTSOURCEINFO QWORD
 ullEventInterest AS QUAD ' ULONGLONG
 ullQueuedInterest AS QUAD ' ULONGLONG
 ulCount AS DWORD ' ULONG
END TYPE
' ########################################################################################
' Interface name = ISpEventSource
' IID = {BE7A9CCE-5F9E-11D2-960F-00C04F8EE628}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpNotifySource
' ########################################################################################
#IF NOT %DEF(%ISpEventSource_INTERFACE_DEFINED)
 %ISpEventSource_INTERFACE_DEFINED = 1
INTERFACE ISpEventSource $IID_ISpEventSource
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpNotifySource Methods
 ' =====================================================================================
 METHOD SetNotifySink ( ' VTable offset = 12
 BYVAL pNotifySink AS ISpNotifySink
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyWindowMessage ( ' VTable offset = 16
 BYVAL hWnd AS DWORD
 , BYVAL Msg AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyCallbackFunction ( ' VTable offset = 20
 BYVAL pfnCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyCallbackInterface ( ' VTable offset = 24
 BYVAL pSpCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyWin32Event ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD WaitForNotifyEvent ( ' VTable offset = 32
 BYVAL dwMilliseconds AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNotifyEventHandle ( ' VTable offset = 36
 ) AS DWORD
 ' =====================================================================================
 ' =====================================================================================
 ' ISpEventSource Methods
 ' =====================================================================================
 METHOD SetInterest ( ' VTable offset = 40
 BYVAL ullEventInterest AS QUAD
 , BYVAL ullQueuedInterest AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetEvents ( ' VTable offset = 44
 BYVAL ulCount AS DWORD
 , BYREF pEventArray AS SPEVENT
 , BYREF pulFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetInfo ( ' VTable offset = 48
 BYREF pInfo AS SPEVENTSOURCEINFO
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpEventSource_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpEventSource2
' IID = 2373A435-6A4B-429E-A6AC-D4231A61975B
' Inherited interface = ISpEventSource
' ########################################################################################
#IF NOT %DEF(%ISpEventSource2_INTERFACE_DEFINED)
 %ISpEventSource2_INTERFACE_DEFINED = 1
INTERFACE ISpEventSource2 $IID_ISpEventSource2
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpNotifySource Methods
 ' =====================================================================================
 METHOD SetNotifySink ( ' VTable offset = 12
 BYVAL pNotifySink AS ISpNotifySink
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyWindowMessage ( ' VTable offset = 16
 BYVAL hWnd AS DWORD
 , BYVAL Msg AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyCallbackFunction ( ' VTable offset = 20
 BYVAL pfnCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyCallbackInterface ( ' VTable offset = 24
 BYVAL pSpCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyWin32Event ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD WaitForNotifyEvent ( ' VTable offset = 32
 BYVAL dwMilliseconds AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNotifyEventHandle ( ' VTable offset = 36
 ) AS DWORD
 ' =====================================================================================
 ' =====================================================================================
 ' ISpEventSource Methods
 ' =====================================================================================
 METHOD SetInterest ( ' VTable offset = 40
 BYVAL ullEventInterest AS QUAD
 , BYVAL ullQueuedInterest AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetEvents ( ' VTable offset = 44
 BYVAL ulCount AS DWORD
 , BYREF pEventArray AS SPEVENT
 , BYREF pulFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetInfo ( ' VTable offset = 48
 BYREF pInfo AS SPEVENTSOURCEINFO
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpEventSource2 Method
 ' =====================================================================================
 METHOD GetEventsEx ( ' VTable offset = 52
 BYVAL ulCount AS DWORD
 , BYREF pEventArray AS SPEVENTEX
 , BYREF pulFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpEventSource2_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpEventSink
' IID = {BE7A9CC9-5F9E-11D2-960F-00C04F8EE628}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpEventSink_INTERFACE_DEFINED)
 %ISpEventSink_INTERFACE_DEFINED = 1
INTERFACE ISpEventSink $IID_ISpEventSink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AddEvents ( ' VTable offset = 12
 BYREF pEventArray AS SPEVENT
 , BYVAL ulCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetEventInterest ( ' VTable offset = 16
 BYREF pullEventInterest AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpEventSink_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpStreamFormat
' IID = {BED530BE-2606-4F4D-A1C0-54C5CDA5566F}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IStream
' ########################################################################################
#IF NOT %DEF(%ISpStreamFormat_INTERFACE_DEFINED)
 %ISpStreamFormat_INTERFACE_DEFINED = 1
INTERFACE ISpStreamFormat $IID_ISpStreamFormat
 INHERIT IUnknown
 ' =====================================================================================
 ' ISequentialStream Methods
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 12
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Write ( ' VTable offset = 16
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbWritten AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IStream Methods
 ' =====================================================================================
 METHOD Seek ( ' VTable offset = 20
 BYVAL dlibMove AS QUAD
 , BYVAL dwOrigin AS DWORD
 , BYREF plibNewPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSize ( ' VTable offset = 24
 BYVAL libNewSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTo ( ' VTable offset = 28
 BYVAL pstm AS IStream
 , BYVAL cb AS QUAD
 , BYREF pcbRead AS QUAD
 , BYREF pcbWritten AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 32
 BYVAL grfCommitFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Revert ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 METHOD LockRegion ( ' VTable offset = 40
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockRegion ( ' VTable offset = 44
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Stat ( ' VTable offset = 48
 BYREF pstatstg AS STATSTG
 , BYVAL grfStatFlag AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 52
 BYREF ppstm AS IStream
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpStreamFormat Methods
 ' =====================================================================================
 METHOD GetFormat ( ' VTable offset = 56
 BYREF pguidFormatId AS GUID
 , BYREF ppCoMemWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpStreamFormat_INTERFACE_DEFINED__ */
' enum SPFILEMODE
%EQUATE `SPFM_OPEN_READONLY = 0
%EQUATE `SPFM_OPEN_READWRITE = %SPFM_OPEN_READONLY + 1
%EQUATE `SPFM_CREATE = %SPFM_OPEN_READWRITE + 1
%EQUATE `SPFM_CREATE_ALWAYS = %SPFM_CREATE + 1
%EQUATE `SPFM_NUM_MODES = %SPFM_CREATE_ALWAYS + 1
' ########################################################################################
' Interface name = ISpStream
' IID = {12E3CCA9-7518-44C5-A5E7-BA5A79CB929E}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpStreamFormat
' ########################################################################################
#IF NOT %DEF(%ISpStream_INTERFACE_DEFINED)
 %ISpStream_INTERFACE_DEFINED = 1
INTERFACE ISpStream $IID_ISpStream
 INHERIT IUnknown
 ' =====================================================================================
 ' ISequentialStream Methods
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 12
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Write ( ' VTable offset = 16
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbWritten AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IStream Methods
 ' =====================================================================================
 METHOD Seek ( ' VTable offset = 20
 BYVAL dlibMove AS QUAD
 , BYVAL dwOrigin AS DWORD
 , BYREF plibNewPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSize ( ' VTable offset = 24
 BYVAL libNewSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTo ( ' VTable offset = 28
 BYVAL pstm AS IStream
 , BYVAL cb AS QUAD
 , BYREF pcbRead AS QUAD
 , BYREF pcbWritten AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 32
 BYVAL grfCommitFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Revert ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 METHOD LockRegion ( ' VTable offset = 40
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockRegion ( ' VTable offset = 44
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Stat ( ' VTable offset = 48
 BYREF pstatstg AS STATSTG
 , BYVAL grfStatFlag AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 52
 BYREF ppstm AS IStream
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpStreamFormat Methods
 ' =====================================================================================
 METHOD GetFormat ( ' VTable offset = 56
 BYREF pguidFormatId AS GUID
 , BYREF ppCoMemWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpStream Methods
 ' =====================================================================================
 METHOD SetBaseStream ( ' VTable offset = 60
 BYVAL pStream AS IStream
 , BYREF rguidFormat AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD GetBaseStream ( ' VTable offset = 64
 BYREF ppStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD BindToFile ( ' VTable offset = 68
 BYREF pszFileName AS WSTRINGZ
 , BYVAL eMode AS LONG
 , BYREF pFormatId AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 , BYVAL ullEventInterest AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Close ( ' VTable offset = 72
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpStream_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpStreamFormatConverter
' IID = {678A932C-EA71-4446-9B41-78FDA6280A29}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpStreamFormat
' ########################################################################################
#IF NOT %DEF(%ISpStreamFormatConverter_INTERFACE_DEFINED)
 %ISpStreamFormatConverter_INTERFACE_DEFINED = 1
INTERFACE ISpStreamFormatConverter $IID_ISpStreamFormatConverter
 INHERIT IUnknown
 ' =====================================================================================
 ' ISequentialStream Methods
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 12
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Write ( ' VTable offset = 16
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbWritten AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IStream Methods
 ' =====================================================================================
 METHOD Seek ( ' VTable offset = 20
 BYVAL dlibMove AS QUAD
 , BYVAL dwOrigin AS DWORD
 , BYREF plibNewPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSize ( ' VTable offset = 24
 BYVAL libNewSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTo ( ' VTable offset = 28
 BYVAL pstm AS IStream
 , BYVAL cb AS QUAD
 , BYREF pcbRead AS QUAD
 , BYREF pcbWritten AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 32
 BYVAL grfCommitFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Revert ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 METHOD LockRegion ( ' VTable offset = 40
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockRegion ( ' VTable offset = 44
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Stat ( ' VTable offset = 48
 BYREF pstatstg AS STATSTG
 , BYVAL grfStatFlag AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 52
 BYREF ppstm AS IStream
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpStreamFormat Methods
 ' =====================================================================================
 METHOD GetFormat ( ' VTable offset = 56
 BYREF pguidFormatId AS GUID
 , BYREF ppCoMemWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpStreamFormatConverter Methods
 ' =====================================================================================
 METHOD SetBaseStream ( ' VTable offset = 60
 BYVAL pStream AS ISpStreamFormat
 , BYVAL fSetFormatToBaseStreamFormat AS LONG
 , BYVAL fWriteToBaseStream AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetBaseStream ( ' VTable offset = 64
 BYREF ppStream AS ISpStreamFormat
 ) AS LONG
 ' =====================================================================================
 METHOD SetFormat ( ' VTable offset = 68
 BYREF rguidFormatIdOfConvertedStream AS GUID
 , BYREF pWaveFormatExOfConvertedStream AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD ResetSeekPosition ( ' VTable offset = 72
 ) AS LONG
 ' =====================================================================================
 METHOD ScaleConvertedToBaseOffset ( ' VTable offset = 76
 BYVAL ullOffsetConvertedStream AS QUAD
 , BYREF pullOffsetBaseStream AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD ScaleBaseToConvertedOffset ( ' VTable offset = 80
 BYVAL ullOffsetBaseStream AS QUAD
 , BYREF pullOffsetConvertedStream AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpStreamFormatConverter_INTERFACE_DEFINED__ */
' enum _SPAUDIOSTATE
%EQUATE `SPAS_CLOSED = 0
%EQUATE `SPAS_STOP = %SPAS_CLOSED + 1
%EQUATE `SPAS_PAUSE = %SPAS_STOP + 1
%EQUATE `SPAS_RUN = %SPAS_PAUSE + 1
' // Size = 40 bytes
TYPE SPAUDIOSTATUS ' Must be 8 byte aligned
 cbFreeBuffSpace AS LONG ' long
 cbNonBlockingIO AS DWORD ' ULONG
 State AS LONG ' SPAUDIOSTATE enum
 alignment__ AS DWORD
 CurSeekPos AS QUAD ' ULONGLONG
 CurDevicePos AS QUAD ' ULONGLONG
 dwReserved1 AS DWORD
 dwReserved2 AS DWORD
END TYPE
' // Size = 12 bytes
TYPE SPAUDIOBUFFERINFO DWORD
 ulMsMinNotification AS DWORD ' ULONG
 ulMsBufferSize AS DWORD ' ULONG
 ulMsEventBias AS DWORD ' ULONG
END TYPE
' ########################################################################################
' Interface name = ISpAudio
' IID = {C05C768F-FAE8-4EC2-8E07-338321C12452}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpStreamFormat
' ########################################################################################
#IF NOT %DEF(%ISpAudio_INTERFACE_DEFINED)
 %ISpAudio_INTERFACE_DEFINED = 1
INTERFACE ISpAudio $IID_ISpAudio
 INHERIT IUnknown
 ' =====================================================================================
 ' ISequentialStream Methods
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 12
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Write ( ' VTable offset = 16
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbWritten AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IStream Methods
 ' =====================================================================================
 METHOD Seek ( ' VTable offset = 20
 BYVAL dlibMove AS QUAD
 , BYVAL dwOrigin AS DWORD
 , BYREF plibNewPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSize ( ' VTable offset = 24
 BYVAL libNewSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTo ( ' VTable offset = 28
 BYVAL pstm AS IStream
 , BYVAL cb AS QUAD
 , BYREF pcbRead AS QUAD
 , BYREF pcbWritten AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 32
 BYVAL grfCommitFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Revert ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 METHOD LockRegion ( ' VTable offset = 40
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockRegion ( ' VTable offset = 44
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Stat ( ' VTable offset = 48
 BYREF pstatstg AS STATSTG
 , BYVAL grfStatFlag AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 52
 BYREF ppstm AS IStream
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpStreamFormat Methods
 ' =====================================================================================
 METHOD GetFormat ( ' VTable offset = 56
 BYREF pguidFormatId AS GUID
 , BYREF ppCoMemWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpAudio Methods
 ' =====================================================================================
 METHOD SetState ( ' VTable offset = 60
 BYVAL NewState AS LONG
 , BYVAL ullReserved AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetFormat ( ' VTable offset = 64
 BYREF rguidFmtId AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 68
 BYREF pStatus AS SPAUDIOSTATUS
 ) AS LONG
 ' =====================================================================================
 METHOD SetBufferInfo ( ' VTable offset = 72
 BYREF pBuffInfo AS SPAUDIOBUFFERINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetBufferInfo ( ' VTable offset = 76
 BYREF pBuffInfo AS SPAUDIOBUFFERINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetDefaultFormat ( ' VTable offset = 80
 BYREF pFormatId AS GUID
 , BYREF ppCoMemWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD EventHandle ( ' VTable offset = 84
 ) AS DWORD ' void
 ' =====================================================================================
 METHOD GetVolumeLevel ( ' VTable offset = 88
 BYREF pLevel AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetVolumeLevel ( ' VTable offset = 92
 BYVAL Level AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBufferNotifySize ( ' VTable offset = 96
 BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetBufferNotifySize ( ' VTable offset = 100
 BYVAL cbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpAudio_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpMMSysAudio
' IID = {15806F6E-1D70-4B48-98E6-3B1A007509AB}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpAudio
' ########################################################################################
#IF NOT %DEF(%ISpMMSysAudio_INTERFACE_DEFINED)
 %ISpMMSysAudio_INTERFACE_DEFINED = 1
INTERFACE ISpMMSysAudio $IID_ISpMMSysAudio
 INHERIT IUnknown
 ' =====================================================================================
 ' ISequentialStream Methods
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 12
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Write ( ' VTable offset = 16
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbWritten AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IStream Methods
 ' =====================================================================================
 METHOD Seek ( ' VTable offset = 20
 BYVAL dlibMove AS QUAD
 , BYVAL dwOrigin AS DWORD
 , BYREF plibNewPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSize ( ' VTable offset = 24
 BYVAL libNewSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTo ( ' VTable offset = 28
 BYVAL pstm AS IStream
 , BYVAL cb AS QUAD
 , BYREF pcbRead AS QUAD
 , BYREF pcbWritten AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 32
 BYVAL grfCommitFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Revert ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 METHOD LockRegion ( ' VTable offset = 40
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockRegion ( ' VTable offset = 44
 BYVAL libOffset AS QUAD
 , BYVAL cb AS QUAD
 , BYVAL dwLockType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Stat ( ' VTable offset = 48
 BYREF pstatstg AS STATSTG
 , BYVAL grfStatFlag AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 52
 BYREF ppstm AS IStream
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpStreamFormat Methods
 ' =====================================================================================
 METHOD GetFormat ( ' VTable offset = 56
 BYREF pguidFormatId AS GUID
 , BYREF ppCoMemWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpAudio Methods
 ' =====================================================================================
 METHOD SetState ( ' VTable offset = 60
 BYVAL NewState AS LONG
 , BYVAL ullReserved AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetFormat ( ' VTable offset = 64
 BYREF rguidFmtId AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 68
 BYREF pStatus AS SPAUDIOSTATUS
 ) AS LONG
 ' =====================================================================================
 METHOD SetBufferInfo ( ' VTable offset = 72
 BYREF pBuffInfo AS SPAUDIOBUFFERINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetBufferInfo ( ' VTable offset = 76
 BYREF pBuffInfo AS SPAUDIOBUFFERINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetDefaultFormat ( ' VTable offset = 80
 BYREF pFormatId AS GUID
 , BYREF ppCoMemWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD EventHandle ( ' VTable offset = 84
 ) AS DWORD ' void
 ' =====================================================================================
 METHOD GetVolumeLevel ( ' VTable offset = 88
 BYREF pLevel AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetVolumeLevel ( ' VTable offset = 92
 BYVAL Level AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBufferNotifySize ( ' VTable offset = 96
 BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetBufferNotifySize ( ' VTable offset = 100
 BYVAL cbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpMMSysAudio Methods
 ' =====================================================================================
 METHOD GetDeviceId ( ' VTable offset = 104
 BYREF puDeviceId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDeviceId ( ' VTable offset = 108
 BYVAL uDeviceId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMMHandle ( ' VTable offset = 112
 BYVAL pHandle AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetLineId ( ' VTable offset = 116
 BYREF puLineId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetLineId ( ' VTable offset = 120
 BYVAL uLineId AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpMMSysAudio_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpTranscript
' IID = {CE17C09B-4EFA-44D5-A4C9-59D9585AB0CD}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpTranscript_INTERFACE_DEFINED)
 %ISpTranscript_INTERFACE_DEFINED = 1
INTERFACE ISpTranscript $IID_ISpTranscript
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetTranscript ( ' VTable offset = 12
 BYREF ppszTranscript AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AppendTranscript ( ' VTable offset = 16
 BYREF pszTranscript AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpTranscript_INTERFACE_DEFINED__ */
' enum SPDISPLYATTRIBUTES
%EQUATE `SPAF_ONE_TRAILING_SPACE = &H2
%EQUATE `SPAF_TWO_TRAILING_SPACES = &H4
%EQUATE `SPAF_CONSUME_LEADING_SPACES = &H8
%EQUATE `SPAF_ALL = &Hf
%EQUATE `SPAF_USER_SPECIFIED = &H80
'typedef WCHAR SPPHONEID;
'typedef LPWSTR PSPPHONEID;
'typedef LPCWSTR PCSPPHONEID;
' // Size = 44 bytes
TYPE SPPHRASEELEMENT DWORD FILL
 ulAudioTimeOffset AS DWORD ' ULONG
 ulAudioSizeTime AS DWORD ' ULONG
 ulAudioStreamOffset AS DWORD ' ULONG
 ulAudioSizeBytes AS DWORD ' ULONG
 ulRetainedStreamOffset AS DWORD ' ULONG
 ulRetainedSizeBytes AS DWORD ' ULONG
 pszDisplayText AS WSTRINGZ PTR ' const WCHAR *
 pszLexicalForm AS WSTRINGZ PTR ' const WCHAR *
 pszPronunciation AS WSTRINGZ PTR ' const SPPHONEID *
 bDisplayAttributes AS BYTE ' BYTE
 RequiredConfidence AS BYTE ' signed char
 ActualConfidence AS BYTE ' signed char
 Reserved AS BYTE ' BYTE
 SREngineConfidence AS SINGLE ' float
END TYPE
' // Size = 32 bytes
TYPE SPPHRASERULE DWORD
 pszName AS WSTRINGZ PTR ' const WCHAR *
 ulId AS DWORD ' ULONG
 ulFirstElement AS DWORD ' ULONG
 ulCountOfElements AS DWORD ' ULONG
 pNextSibling AS SPPHRASERULE PTR ' const SPPHRASERULE *
 pFirstChild AS SPPHRASERULE PTR ' const SPPHRASERULE *
 SREngineConfidence AS SINGLE ' float
 Confidence AS BYTE ' signed char
END TYPE
' enum SPPHRASEPROPERTYUNIONTYPE
%EQUATE `SPPPUT_UNUSED = 0
%EQUATE `SPPPUT_ARRAY_INDEX = %SPPPUT_UNUSED + 1
' // Size = 4 bytes
TYPE SPPHRASEPROPERTY_UNION_STRUCT BYTE
 bType AS BYTE ' byte
 bReserved AS BYTE ' byte
 usArrayIndex AS WORD ' unsigned short
END TYPE
' // Size = 4 bytes
UNION SPPHRASEPROPERTY_UNION
 ulId AS DWORD ' ULONG
 SPPHRASEPROPERTY_UNION_STRUCT
END UNION
' // Size = 56 bytes
TYPE SPPHRASEPROPERTY ' Must be 8 byte aligned
 pszName AS WSTRINGZ PTR ' const WCHAR *
 SPPHRASEPROPERTY_UNION
 pszValue AS WSTRINGZ PTR ' const WCHAR *
 alignment1__ AS DWORD
 vValue AS tagVARIANT ' VARIANT
 ulFirstElement AS DWORD ' ULONG
 ulCountOfElements AS DWORD ' ULONG
 pNextSibling AS SPPHRASEPROPERTY PTR ' const SPPHRASEPROPERTY *
 pFirstChild AS SPPHRASEPROPERTY PTR ' const SPPHRASEPROPERTY *
 SREngineConfidence AS SINGLE ' float
 Confidence AS BYTE ' signed char
 alignment2__(2) AS BYTE
END TYPE
' // Size = 16 bytes
TYPE SPPHRASEREPLACEMENT DWORD
 bDisplayAttributes AS BYTE ' BYTE
 pszReplacementText AS WSTRINGZ PTR ' const WCHAR *
 ulFirstElement AS DWORD ' ULONG
 ulCountOfElements AS DWORD ' ULONG
END TYPE
' // Size = 20 bytes
TYPE SPSEMANTICERRORINFO
 ulLineNumber AS DWORD ' ULONG
 pszScriptLine AS WSTRINGZ PTR
 pszSource AS WSTRINGZ PTR
 pszDescription AS WSTRINGZ PTR
 hrResultCode AS LONG
END TYPE
' enum SPSEMANTICFORMAT
%EQUATE `SPSMF_SAPI_PROPERTIES = 0
%EQUATE `SPSMF_SRGS_SEMANTICINTERPRETATION_MS = 1
%EQUATE `SPSMF_SRGS_SAPIPROPERTIES = 2
%EQUATE `SPSMF_UPS = 4
%EQUATE `SPSMF_SRGS_SEMANTICINTERPRETATION_W3C = 8
' // Size = 120 bytes
TYPE SPPHRASE_50 ' Must be 8 byte aligned
 cbSize AS DWORD ' ULONG
 LangId AS WORD ' WORD
 wHomophoneGroupId AS WORD ' WORD
 ullGrammarID AS QUAD ' ULONGLONG
 ftStartTime AS QUAD ' ULONGLONG
 ullAudioStreamPosition AS QUAD ' ULONGLONG
 ulAudioSizeBytes AS DWORD ' ULONG
 ulRetainedSizeBytes AS DWORD ' ULONG
 ulAudioSizeTime AS DWORD ' ULONG
 Rule AS SPPHRASERULE ' SPPHRASERULE
 pProperties AS SPPHRASEPROPERTY PTR ' const SPPHRASEPROPERTY *
 pElements AS SPPHRASEELEMENT PTR ' const SPPHRASEELEMENT *
 cReplacements AS DWORD ' ULONG
 pReplacements AS SPPHRASEREPLACEMENT PTR ' const SPPHRASEREPLACEMENT *
 alignment__ AS DWORD ' // To keep 8 byte alignment
 SREngineID AS GUID ' GUID
 ulSREnginePrivateDataSize AS DWORD ' ULONG
 pSREnginePrivateData AS BYTE PTR ' const BYTE *
END TYPE
' // Size = 128 bytes
TYPE SPPHRASE_53 ' Must be 8 byte aligned
 cbSize AS DWORD ' ULONG
 LangId AS WORD ' WORD
 wHomophoneGroupId AS WORD ' WORD
 ullGrammarID AS QUAD ' ULONGLONG
 ftStartTime AS QUAD ' ULONGLONG
 ullAudioStreamPosition AS QUAD ' ULONGLONG
 ulAudioSizeBytes AS DWORD ' ULONG
 ulRetainedSizeBytes AS DWORD ' ULONG
 ulAudioSizeTime AS DWORD ' ULONG
 Rule AS SPPHRASERULE ' SPPHRASERULE
 pProperties AS SPPHRASEPROPERTY PTR ' const SPPHRASEPROPERTY *
 pElements AS SPPHRASEELEMENT PTR ' const SPPHRASEELEMENT *
 cReplacements AS DWORD ' ULONG
 pReplacements AS SPPHRASEREPLACEMENT PTR ' const SPPHRASEREPLACEMENT *
 alignment__ AS DWORD ' // To keep 8 byte alignment
 SREngineID AS GUID ' GUID
 ulSREnginePrivateDataSize AS DWORD ' ULONG
 pSREnginePrivateData AS BYTE PTR ' const BYTE *
 pSML AS WSTRINGZ PTR ' LPWSTR pSML
 pSemanticErrorInfo AS SPSEMANTICERRORINFO PTR ' SPSEMANTICERRORINFO *pSemanticErrorInfo
END TYPE
' // Size = 136 bytes
TYPE SPPHRASE_54 ' Must be 8 byte aligned
 cbSize AS DWORD ' ULONG
 LangId AS WORD ' WORD
 wHomophoneGroupId AS WORD ' WORD
 ullGrammarID AS QUAD ' ULONGLONG
 ftStartTime AS QUAD ' ULONGLONG
 ullAudioStreamPosition AS QUAD ' ULONGLONG
 ulAudioSizeBytes AS DWORD ' ULONG
 ulRetainedSizeBytes AS DWORD ' ULONG
 ulAudioSizeTime AS DWORD ' ULONG
 Rule AS SPPHRASERULE ' SPPHRASERULE
 pProperties AS SPPHRASEPROPERTY PTR ' const SPPHRASEPROPERTY *
 pElements AS SPPHRASEELEMENT PTR ' const SPPHRASEELEMENT *
 cReplacements AS DWORD ' ULONG
 pReplacements AS SPPHRASEREPLACEMENT PTR ' const SPPHRASEREPLACEMENT *
 alignment__ AS DWORD ' // To keep 8 byte alignment
 SREngineID AS GUID ' GUID
 ulSREnginePrivateDataSize AS DWORD ' ULONG
 pSREnginePrivateData AS BYTE PTR ' const BYTE *
 pSML AS WSTRINGZ PTR ' LPWSTR pSML
 pSemanticErrorInfo AS SPSEMANTICERRORINFO PTR ' SPSEMANTICERRORINFO *pSemanticErrorInfo
 SemanticTagFormat AS LONG ' SPSEMANTICFORMAT <enum>
 alignment2__ AS DWORD ' // To keep 8 byte alignment
END TYPE
#IF %SAPI_VER =< &H051
 MACRO SPPHRASE = SPPHRASE_50
#ELSEIF %SAPI_VER = &H053
 MACRO SPPHRASE = SPPHRASE_53
#ELSE
 MACRO SPPHRASE = SPPHRASE_54
#ENDIF
' // Size = 4 bytes
TYPE SPSERIALIZEDPHRASE DWORD
 ulSerializedSize AS DWORD ' ULONG
END TYPE
' // Size = 12 bytes
TYPE SPRULE DWORD
 pszRuleName AS WSTRINGZ PTR
 ulRuleId AS DWORD ' ULONG
 dwAttributes AS DWORD
END TYPE
' enum SPVALUETYPE
%EQUATE `SPDF_PROPERTY = &H1
%EQUATE `SPDF_REPLACEMENT = &H2
%EQUATE `SPDF_RULE = &H4
%EQUATE `SPDF_DISPLAYTEXT = &H8
%EQUATE `SPDF_LEXICALFORM = &H10
%EQUATE `SPDF_PRONUNCIATION = &H20
%EQUATE `SPDF_AUDIO = &H40
%EQUATE `SPDF_ALTERNATES = &H80
%EQUATE `SPDF_ALL = &Hff
' // Size = 4 bytes
TYPE SPBINARYGRAMMAR DWORD
 ulTotalSerializedSize AS DWORD ' ULONG
END TYPE
' enum SPPHRASERNG
%EQUATE `SPPR_ALL_ELEMENTS = -1
%EQUATE `SP_GETWHOLEPHRASE = %SPPR_ALL_ELEMENTS
%EQUATE `SPRR_ALL_ELEMENTS = %SPPR_ALL_ELEMENTS
'typedef void *SPSTATEHANDLE;
' enum SPRECOEVENTFLAGS
%EQUATE `SPREF_AutoPause = 1 ' 1 << 0
%EQUATE `SPREF_Emulated = 2 ' 1 << 1
%EQUATE `SPREF_SMLTimeout = 4 ' 1 << 2
%EQUATE `SPREF_ExtendableParse = 8 ' 1 << 3
%EQUATE `SPREF_ReSent = 16 ' 1 << 4
%EQUATE `SPREF_Hypothesis = 32 ' 1 << 5
%EQUATE `SPREF_FalseRecognition = 64 ' 1 << 6
' enum SPPARTOFSPEECH
%EQUATE `SPPS_NotOverriden = -1
%EQUATE `SPPS_Unknown = 0
%EQUATE `SPPS_Noun = &H1000
%EQUATE `SPPS_Verb = &H2000
%EQUATE `SPPS_Modifier = &H3000
%EQUATE `SPPS_Function = &H4000
%EQUATE `SPPS_Interjection = &H5000
%EQUATE `SPPS_Noncontent = &H6000
%EQUATE `SPPS_LMA = &H7000
%EQUATE `SPPS_SuppressWord = &Hf000
' enum SPLEXICONTYPE
%EQUATE `eLEXTYPE_USER = &H1 ' 1L << 0
%EQUATE `eLEXTYPE_APP = &H2 ' 1L << 1
%EQUATE `eLEXTYPE_RESERVED1 = &H4 ' 1L << 2
%EQUATE `eLEXTYPE_RESERVED2 = &H8 ' 1L << 3
%EQUATE `eLEXTYPE_RESERVED3 = &H10 ' 1L << 4
%EQUATE `eLEXTYPE_RESERVED4 = &H20 ' 1L << 5
%EQUATE `eLEXTYPE_RESERVED5 = &H40 ' 1L << 6
%EQUATE `eLEXTYPE_RESERVED6 = &H80 ' 1L << 7
%EQUATE `eLEXTYPE_RESERVED7 = &H100 ' 1L << 8
%EQUATE `eLEXTYPE_RESERVED8 = &H200 ' 1L << 9
%EQUATE `eLEXTYPE_RESERVED9 = &H400 ' 1L << 10
%EQUATE `eLEXTYPE_RESERVED10 = &H800 ' 1L << 11
%EQUATE `eLEXTYPE_PRIVATE1 = &H1000 ' 1L << 12
%EQUATE `eLEXTYPE_PRIVATE2 = &H2000 ' 1L << 13
%EQUATE `eLEXTYPE_PRIVATE3 = &H4000 ' 1L << 14
%EQUATE `eLEXTYPE_PRIVATE4 = &H8000 ' 1L << 15
%EQUATE `eLEXTYPE_PRIVATE5 = &H10000 ' 1L << 16
%EQUATE `eLEXTYPE_PRIVATE6 = &H20000 ' 1L << 17
%EQUATE `eLEXTYPE_PRIVATE7 = &H40000 ' 1L << 18
%EQUATE `eLEXTYPE_PRIVATE8 = &H80000 ' 1L << 19
%EQUATE `eLEXTYPE_PRIVATE9 = &H100000 ' 1L << 20
%EQUATE `eLEXTYPE_PRIVATE10 = &H200000 ' 1L << 21
%EQUATE `eLEXTYPE_PRIVATE11 = &H400000 ' 1L << 22
%EQUATE `eLEXTYPE_PRIVATE12 = &H800000 ' 1L << 23
%EQUATE `eLEXTYPE_PRIVATE13 = &H1000000 ' 1L << 24
%EQUATE `eLEXTYPE_PRIVATE14 = &H2000000 ' 1L << 25
%EQUATE `eLEXTYPE_PRIVATE15 = &H4000000 ' 1L << 26
%EQUATE `eLEXTYPE_PRIVATE16 = &H8000000 ' 1L << 27
%EQUATE `eLEXTYPE_PRIVATE17 = &H10000000 ' 1L << 28
%EQUATE `eLEXTYPE_PRIVATE18 = &H20000000 ' 1L << 29
%EQUATE `eLEXTYPE_PRIVATE19 = &H40000000 ' 1L << 30
%EQUATE `eLEXTYPE_PRIVATE20 = &H80000000 ' 1L << 31 ' -2147483648
' enum SPWORDTYPE
%EQUATE `eWORDTYPE_ADDED = 1 ' 1L << 0
%EQUATE `eWORDTYPE_DELETED = 2 ' 1L << 1
'enum SPPRONUNCIATIONFLAGS
%EQUATE `ePRONFLAG_USED = 1 ' 1 << 0
' // Size = 20 bytes
TYPE SPWORDPRONUNCIATION
 pNextWordPronunciation AS SPWORDPRONUNCIATION PTR ' struct SPWORDPRONUNCIATION *
 eLexiconType AS LONG ' SPLEXICONTYPE enum
 LangId AS WORD ' WORD
 wReserved AS WORD ' WORD
 ePartOfSpeech AS LONG ' SPPARTOFSPEECH enum
 szPronunciation AS WSTRINGZ * 2 ' SPPHONEID szPronunciation[ 1 ]
 ' Note: We are using AS WSTRINGZ * 2 to keep DWORD alignment. The length is vafriable.
END TYPE
' // Size = 12 bytes
TYPE SPWORDPRONUNCIATIONLIST DWORD
 ulSize AS DWORD ' ULONG
 pvBuffer AS BYTE PTR ' BYTE *
 pFirstWordPronunciation AS SPWORDPRONUNCIATION PTR ' SPWORDPRONUNCIATION *
END TYPE
' // Size = 20 bytes
TYPE SPWORD DWORD FILL
 pNextWord AS SPWORD PTR ' struct SPWORD *
 LangId AS WORD ' WORD
 wReserved AS WORD ' WORD
 eWordType AS LONG ' SPWORDTYPE enum
 pszWord AS WSTRINGZ PTR ' WCHAR *
 pFirstWordPronunciation AS SPWORDPRONUNCIATION PTR ' SPWORDPRONUNCIATION *
END TYPE
' // Size = 12 bytes
TYPE SPWORDLIST DWORD
 ulSize AS DWORD ' ULONG
 pvBuffer AS BYTE PTR ' BYTE *
 pFirstWord AS SPWORD PTR ' SPWORD *
END TYPE
' ########################################################################################
' Interface name = ISpLexicon
' IID = {DA41A7C2-5383-4DB2-916B-6C1719E3DB58}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpLexicon_INTERFACE_DEFINED)
 %ISpLexicon_INTERFACE_DEFINED = 1
INTERFACE ISpLexicon $IID_ISpLexicon
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetPronunciations ( ' VTable offset = 12
 BYREF pszWord AS WSTRINGZ
 , BYVAL LangID AS WORD
 , BYVAL dwFlags AS DWORD
 , BYREF pWordPronunciationList AS SPWORDPRONUNCIATIONLIST
 ) AS LONG
 ' =====================================================================================
 METHOD AddPronunciation ( ' VTable offset = 16
 BYREF pszWord AS WSTRINGZ
 , BYVAL LangID AS WORD
 , BYVAL ePartOfSpeech AS LONG
 , BYREF pszPronunciation AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD RemovePronunciation ( ' VTable offset = 20
 BYREF pszWord AS WSTRINGZ
 , BYVAL LangID AS WORD
 , BYVAL ePartOfSpeech AS LONG
 , BYREF pszPronunciation AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetGeneration ( ' VTable offset = 24
 BYREF pdwGeneration AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetGenerationChange ( ' VTable offset = 28
 BYVAL dwFlags AS DWORD
 , BYREF pdwGeneration AS DWORD
 , BYREF pWordList AS SPWORDLIST
 ) AS LONG
 ' =====================================================================================
 METHOD GetWords ( ' VTable offset = 32
 BYVAL dwFlags AS DWORD
 , BYREF pdwGeneration AS DWORD
 , BYREF pdwCookie AS DWORD
 , BYREF pWordList AS SPWORDLIST
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpLexicon_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpContainerLexicon
' IID = {8565572F-C094-41CC-B56E-10BD9C3FF044}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpLexicon
' ########################################################################################
#IF NOT %DEF(%ISpContainerLexicon_INTERFACE_DEFINED)
 %ISpContainerLexicon_INTERFACE_DEFINED = 1
INTERFACE ISpContainerLexicon $IID_ISpContainerLexicon
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpLexicon methods
 ' =====================================================================================
 METHOD GetPronunciations ( ' VTable offset = 12
 BYREF pszWord AS WSTRINGZ
 , BYVAL LangID AS WORD
 , BYVAL dwFlags AS DWORD
 , BYREF pWordPronunciationList AS SPWORDPRONUNCIATIONLIST
 ) AS LONG
 ' =====================================================================================
 METHOD AddPronunciation ( ' VTable offset = 16
 BYREF pszWord AS WSTRINGZ
 , BYVAL LangID AS WORD
 , BYVAL ePartOfSpeech AS LONG
 , BYREF pszPronunciation AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD RemovePronunciation ( ' VTable offset = 20
 BYREF pszWord AS WSTRINGZ
 , BYVAL LangID AS WORD
 , BYVAL ePartOfSpeech AS LONG
 , BYREF pszPronunciation AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetGeneration ( ' VTable offset = 24
 BYREF pdwGeneration AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetGenerationChange ( ' VTable offset = 28
 BYVAL dwFlags AS DWORD
 , BYREF pdwGeneration AS DWORD
 , BYREF pWordList AS SPWORDLIST
 ) AS LONG
 ' =====================================================================================
 METHOD GetWords ( ' VTable offset = 32
 BYVAL dwFlags AS DWORD
 , BYREF pdwGeneration AS DWORD
 , BYREF pdwCookie AS DWORD
 , BYREF pWordList AS SPWORDLIST
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpContainerLexicon method
 ' =====================================================================================
 METHOD AddLexicon ( ' VTable offset = 36
 BYVAL pAddLexicon AS ISpLexicon
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpContainerLexicon_INTERFACE_DEFINED__ */
' enum SPSHORTCUTTYPE
%EQUATE `SPSHT_NotOverriden = -1
%EQUATE `SPSHT_Unknown = 0
%EQUATE `SPSHT_EMAIL = &H1000
%EQUATE `SPSHT_OTHER = &H2000
%EQUATE `SPPS_RESERVED1 = &H3000
%EQUATE `SPPS_RESERVED2 = &H4000
%EQUATE `SPPS_RESERVED3 = &H5000
%EQUATE `SPPS_RESERVED4 = &Hf000
' // Size = 20 bytes
TYPE SPSHORTCUTPAIR DWORD FILL
 pNextSHORTCUTPAIR AS SPSHORTCUTPAIR PTR ' struct SPSHORTCUTPAIR *
 LangID AS WORD ' WORD
 shType AS LONG ' SPSHORTCUTTYPE enum
 pszDisplay AS WSTRINGZ PTR
 pszSpoken AS WSTRINGZ PTR
END TYPE
' // Size = 12 bytes
TYPE SPSHORTCUTPAIRLIST DWORD
 ulSize AS DWORD ' ULONG
 pvBuffer AS BYTE PTR ' BYTE *
 pFirstShortcutPair AS SPSHORTCUTPAIR PTR ' SPSHORTCUTPAIR *
END TYPE
' ########################################################################################
' Interface name = ISpShortcut
' IID = 3DF681E2-EA56-11D9-8BDE-F66BAD1E3F3A
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpShortcut_INTERFACE_DEFINED)
 %ISpShortcut_INTERFACE_DEFINED = 1
INTERFACE ISpShortcut $IID_ISpShortcut
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AddShortcut ( ' VTable offset = 12
 BYREF pszDisplay AS WSTRINGZ
 , BYVAL LangID AS WORD
 , BYREF pszSpoken AS WSTRINGZ
 , BYVAL shType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveShortcut ( ' VTable offset = 16
 BYREF pszDisplay AS WSTRINGZ
 , BYVAL LangID AS WORD
 , BYREF pszSpoken AS WSTRINGZ
 , BYVAL shType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetShortcuts ( ' VTable offset = 20
 BYVAL LangID AS WORD
 , BYREF pShortcutpairList AS SPSHORTCUTPAIRLIST
 ) AS LONG
 ' =====================================================================================
 METHOD GetGeneration ( ' VTable offset = 24
 BYVAL pdwGeneration AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetWordsFromGenerationChange ( ' VTable offset = 28
 BYREF pdwGeneration AS DWORD
 , BYREF pWordList AS SPWORDLIST
 ) AS LONG
 ' =====================================================================================
 METHOD GetWords ( ' VTable offset = 32
 BYREF pdwGeneration AS DWORD
 , BYREF pdwCookie AS DWORD
 , BYREF pWordList AS SPWORDLIST
 ) AS LONG
 ' =====================================================================================
 METHOD GetShortcutsForGeneration ( ' VTable offset = 36
 BYREF pdwGeneration AS DWORD
 , BYREF pdwCookie AS DWORD
 , BYREF pShortcutpairList AS SPSHORTCUTPAIRLIST
 ) AS LONG
 ' =====================================================================================
 METHOD GetGenerationChange ( ' VTable offset = 40
 BYVAL pdwGeneration AS DWORD
 , BYREF pShortcutpairList AS SPSHORTCUTPAIRLIST
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpShortcut_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpPhoneConverter
' IID = {8445C581-0CAC-4A38-ABFE-9B2CE2826455}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpObjectWithToken
' ########################################################################################
#IF NOT %DEF(%ISpPhoneConverter_INTERFACE_DEFINED)
 %ISpPhoneConverter_INTERFACE_DEFINED = 1
INTERFACE ISpPhoneConverter $IID_ISpPhoneConverter
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpObjectWithToken Methods
 ' =====================================================================================
 METHOD SetObjectToken ( ' VTable offset = 12
 BYVAL pToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD GetObjectToken ( ' VTable offset = 16
 BYREF ppToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpPhoneConverter Methods
 ' =====================================================================================
 METHOD PhoneToId ( ' VTable offset = 20
 BYREF pszPhone AS WSTRINGZ
 , BYREF pId AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD IdToPhone ( ' VTable offset = 24
 BYREF pId AS WSTRINGZ
 , BYREF pszPhone AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpPhoneConverter_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpPhoneticAlphabetConverter
' IID = 133ADCD4-19B4-4020-9FDC-842E78253B17
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpPhoneticAlphabetConverter_INTERFACE_DEFINED)
 %ISpPhoneticAlphabetConverter_INTERFACE_DEFINED = 1
INTERFACE ISpPhoneticAlphabetConverter $IID_ISpPhoneticAlphabetConverter
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetLangId ( ' VTable offset = 12
 BYREF pLangID AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetLangId ( ' VTable offset = 16
 BYVAL LangID AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD SAPI2UPS ( ' VTable offset = 20
 BYREF pszSAPIId AS WSTRINGZ
 , BYREF pszUPSId AS DWORD
 , BYVAL cMaxLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UPS2SAPI ( ' VTable offset = 24
 BYREF pszUPSId AS WSTRINGZ
 , BYREF pszSAPIId AS WSTRINGZ
 , BYVAL cMaxLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMaxConvertLength ( ' VTable offset = 28
 BYVAL cSrcLength AS DWORD
 , BYVAL bSAPI2UPS AS LONG
 , BYREF pcMaxDestLength AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpPhoneticAlphabetConverter_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpPhoneticAlphabetSelection
' IID = B2745EFD-42CE-48CA-81F1-A96E02538A90
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpPhoneticAlphabetSelection_INTERFACE_DEFINED)
 %ISpPhoneticAlphabetSelection_INTERFACE_DEFINED = 1
INTERFACE ISpPhoneticAlphabetSelection $IID_ISpPhoneticAlphabetSelection
 INHERIT IUnknown
 ' =====================================================================================
 METHOD IsAlphabetUPS ( ' VTable offset = 12
 BYREF pfIsUPS AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetAlphabetToUPS ( ' VTable offset = 16
 BYVAL fForceUPS AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpPhoneticAlphabetSelection_INTERFACE_DEFINED__ */
' // Size = 8 bytes
TYPE SPVPITCH DWORD
 MiddleAdj AS LONG
 RangeAdj AS LONG
END TYPE
' enum SPVACTIONS
%EQUATE `SPVA_Speak = 0
%EQUATE `SPVA_Silence = %SPVA_Speak + 1
%EQUATE `SPVA_Pronounce = %SPVA_Silence + 1
%EQUATE `SPVA_Bookmark = %SPVA_Pronounce + 1
%EQUATE `SPVA_SpellOut = %SPVA_Bookmark + 1
%EQUATE `SPVA_Section = %SPVA_SpellOut + 1
%EQUATE `SPVA_ParseUnknownTag = %SPVA_Section + 1
' // Size = 12 bytes
TYPE SPVCONTEXT DWORD
 pCategory AS WSTRINGZ PTR
 pBefore AS WSTRINGZ PTR
 pAfter AS WSTRINGZ PTR
END TYPE
' // Size = 52 bytes
TYPE SPVSTATE DWORD FILL
 eAction AS LONG ' SPVACTIONS
 LangID AS WORD ' WORD
 wReserved AS WORD ' WORD
 EmphAdj AS LONG ' long
 RateAdj AS LONG ' long
 Volume AS DWORD ' ULONG
 PitchAdj AS SPVPITCH ' SPVPITCH
 SilenceMSecs AS DWORD ' ULONG
 pPhoneIds AS WSTRINGZ PTR ' SPPHONEID *
 ePartOfSpeech AS LONG ' SPPARTOFSPEECH enum
 Context AS SPVCONTEXT ' SPVCONTEXT
END TYPE
' enum SPRUNSTATE
%EQUATE `SPRS_DONE = 1 ' 1L << 0
%EQUATE `SPRS_IS_SPEAKING = 2 ' 1L << 1
' enum SPVLIMITS
%EQUATE `SPMIN_VOLUME = 0
%EQUATE `SPMAX_VOLUME = 100
%EQUATE `SPMIN_RATE = -10
%EQUATE `SPMAX_RATE = 10
' enum SPVPRIORITY
%EQUATE `SPVPRI_NORMAL = 0
%EQUATE `SPVPRI_ALERT = 1 ' 1L << 0
%EQUATE `SPVPRI_OVER = 2 ' 1L << 1
' // Size = 52 bytes
TYPE SPVOICESTATUS DWORD FILL
 ulCurrentStream AS DWORD ' ULONG
 ulLastStreamQueued AS DWORD ' ULONG
 hrLastResult AS LONG
 dwRunningState AS DWORD
 ulInputWordPos AS DWORD ' ULONG
 ulInputWordLen AS DWORD ' ULONG
 ulInputSentPos AS DWORD ' ULONG
 ulInputSentLen AS DWORD ' ULONG
 lBookmarkId AS LONG
 PhonemeId AS INTEGER ' SPPHONEID
 VisemeId AS LONG ' SPVISEMES
 dwReserved1 AS DWORD
 dwReserved2 AS DWORD
END TYPE
' enum SPEAKFLAGS
%EQUATE `SPF_DEFAULT = 0
%EQUATE `SPF_ASYNC = &H1 ' 1L << 0
%EQUATE `SPF_PURGEBEFORESPEAK = &H2 ' 1L << 1
%EQUATE `SPF_IS_FILENAME = &H4 ' 1L << 2
%EQUATE `SPF_IS_XML = &H8 ' 1L << 3
%EQUATE `SPF_IS_NOT_XML = &H10 ' 1L << 4
%EQUATE `SPF_PERSIST_XML = &H20 ' 1L << 5
%EQUATE `SPF_NLP_SPEAK_PUNC = &H40 ' 1L << 6
%EQUATE `SPF_NLP_MASK = %SPF_NLP_SPEAK_PUNC
%EQUATE `SPF_VOICE_MASK = %SPF_ASYNC OR %SPF_PURGEBEFORESPEAK OR %SPF_IS_FILENAME OR %SPF_IS_XML OR %SPF_IS_NOT_XML OR %SPF_NLP_MASK OR %SPF_PERSIST_XML
%EQUATE `SPF_UNUSED_FLAGS = NOT %SPF_VOICE_MASK
' ########################################################################################
' Interface name = ISpVoice
' IID = {6C44DF74-72B9-4992-A1EC-EF996E0422D4}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpEventSource
' ########################################################################################
#IF NOT %DEF(%ISpVoice_INTERFACE_DEFINED)
 %ISpVoice_INTERFACE_DEFINED = 1
INTERFACE ISpVoice $IID_ISpVoice
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpNotifySource Methods
 ' =====================================================================================
 METHOD SetNotifySink ( ' VTable offset = 12
 BYVAL pNotifySink AS ISpNotifySink
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyWindowMessage ( ' VTable offset = 16
 BYVAL hWnd AS DWORD
 , BYVAL Msg AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyCallbackFunction ( ' VTable offset = 20
 BYVAL pfnCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyCallbackInterface ( ' VTable offset = 24
 BYVAL pSpCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyWin32Event ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD WaitForNotifyEvent ( ' VTable offset = 32
 BYVAL dwMilliseconds AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNotifyEventHandle ( ' VTable offset = 36
 ) AS DWORD
 ' =====================================================================================
 ' =====================================================================================
 ' ISpEventSource Methods
 ' =====================================================================================
 METHOD SetInterest ( ' VTable offset = 40
 BYVAL ullEventInterest AS QUAD
 , BYVAL ullQueuedInterest AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetEvents ( ' VTable offset = 44
 BYVAL ulCount AS DWORD
 , BYREF pEventArray AS SPEVENT
 , BYREF pulFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetInfo ( ' VTable offset = 48
 BYREF pInfo AS SPEVENTSOURCEINFO
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpVoice Methods
 ' =====================================================================================
 METHOD SetOutput ( ' VTable offset = 52
 BYVAL pUnkOutput AS IUnknown
 , BYVAL fAllowFormatChanges AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetOutputObjectToken ( ' VTable offset = 56
 BYREF ppObjectToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD GetOutputStream ( ' VTable offset = 60
 BYREF ppStream AS ISpStreamFormat
 ) AS LONG
 ' =====================================================================================
 METHOD Pause ( ' VTable offset = 64
 ) AS LONG
 ' =====================================================================================
 METHOD Resume ( ' VTable offset = 68
 ) AS LONG
 ' =====================================================================================
 METHOD SetVoice ( ' VTable offset = 72
 BYVAL pToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD GetVoice ( ' VTable offset = 76
 BYREF ppToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD Speak ( ' VTable offset = 80
 BYREF pwcs AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYREF pulStreamNumber AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SpeakStream ( ' VTable offset = 84
 BYVAL pStream AS IStream
 , BYVAL dwFlags AS DWORD
 , BYREF pulStreamNumber AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 88
 BYREF pStatus AS SPVOICESTATUS
 , BYREF ppszLastBookmark AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 92
 BYREF pItemType AS WSTRINGZ
 , BYVAL lNumItems AS LONG
 , BYREF pulNumSkipped AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetPriority ( ' VTable offset = 96
 BYVAL ePriority AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetPriority ( ' VTable offset = 100
 BYREF pePriority AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetAlertBoundary ( ' VTable offset = 104
 BYVAL eBoundary AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetAlertBoundary ( ' VTable offset = 108
 BYREF peBoundary AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetRate ( ' VTable offset = 112
 BYVAL RateAdjust AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetRate ( ' VTable offset = 116
 BYREF pRateAdjust AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetVolume ( ' VTable offset = 120
 BYVAL usVolume AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetVolume ( ' VTable offset = 124
 BYREF pusVolume AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD WaitUntilDone ( ' VTable offset = 128
 BYVAL msTimeout AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSyncSpeakTimeout ( ' VTable offset = 132
 BYVAL msTimeout AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSyncSpeakTimeout ( ' VTable offset = 136
 BYREF pmsTimeout AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SpeakCompleteEvent ( ' VTable offset = 140
 ) AS DWORD ' void
 ' =====================================================================================
 METHOD IsUISupported ( ' VTable offset = 144
 BYREF pszTypeOfUI AS WSTRINGZ
 , BYVAL pvExtraData AS DWORD
 , BYVAL cbExtraData AS DWORD
 , BYREF pfSupported AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD DisplayUI ( ' VTable offset = 148
 BYVAL hwndParent AS DWORD
 , BYREF pszTitle AS WSTRINGZ
 , BYREF pszTypeOfUI AS WSTRINGZ
 , BYVAL pvExtraData AS DWORD
 , BYVAL cbExtraData AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpVoice_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpPhrase
' IID = {1A5C0354-B621-4B5A-8791-D306ED379E53}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpPhrase_INTERFACE_DEFINED)
 %ISpPhrase_INTERFACE_DEFINED = 1
INTERFACE ISpPhrase $IID_ISpPhrase
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetPhrase ( ' VTable offset = 12
 BYREF ppCoMemPhrase AS SPPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetSerializedPhrase ( ' VTable offset = 16
 BYREF ppCoMemPhrase AS SPSERIALIZEDPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetText ( ' VTable offset = 20
 BYVAL ulStart AS DWORD
 , BYVAL ulCount AS DWORD
 , BYVAL fUseTextReplacements AS LONG
 , BYREF ppszCoMemText AS DWORD
 , BYREF pbDisplayAttributes AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD Discard ( ' VTable offset = 24
 BYVAL dwValueTypes AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpPhrase_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpPhraseAlt
' IID = {8FCEBC98-4E49-4067-9C6C-D86A0E092E3D}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpPhrase
' ########################################################################################
#IF NOT %DEF(%ISpPhraseAlt_INTERFACE_DEFINED)
 %ISpPhraseAlt_INTERFACE_DEFINED = 1
INTERFACE ISpPhraseAlt $IID_ISpPhraseAlt
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpPhrase Methods
 ' =====================================================================================
 METHOD GetPhrase ( ' VTable offset = 12
 BYREF ppCoMemPhrase AS SPPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetSerializedPhrase ( ' VTable offset = 16
 BYREF ppCoMemPhrase AS SPSERIALIZEDPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetText ( ' VTable offset = 20
 BYVAL ulStart AS DWORD
 , BYVAL ulCount AS DWORD
 , BYVAL fUseTextReplacements AS LONG
 , BYREF ppszCoMemText AS DWORD
 , BYREF pbDisplayAttributes AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD Discard ( ' VTable offset = 24
 BYVAL dwValueTypes AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpPhraseAlt Methods
 ' =====================================================================================
 METHOD GetAltInfo ( ' VTable offset = 28
 BYREF ppParent AS ISpPhrase
 , BYREF pulStartElementInParent AS DWORD
 , BYREF pcElementsInParent AS DWORD
 , BYREF pcElementsInAlt AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpPhraseAlt_INTERFACE_DEFINED__ */
' enum SPXMLRESULTOPTIONS
%EQUATE `SPXRO_SML = 0
%EQUATE `SPXRO_Alternates_SML = 1
' ########################################################################################
' Interface name = ISpPhrase2
' IID = F264DA52-E457-4696-B856-A737B717AF79
' Inherited interface = ISpPhrase
' ########################################################################################
#IF NOT %DEF(%ISpPhrase2_INTERFACE_DEFINED)
 %ISpPhrase2_INTERFACE_DEFINED = 1
INTERFACE ISpPhrase2 $IID_ISpPhrase2
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpPhrase methods
 ' =====================================================================================
 METHOD GetPhrase ( ' VTable offset = 12
 BYREF ppCoMemPhrase AS SPPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetSerializedPhrase ( ' VTable offset = 16
 BYREF ppCoMemPhrase AS SPSERIALIZEDPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetText ( ' VTable offset = 20
 BYVAL ulStart AS DWORD
 , BYVAL ulCount AS DWORD
 , BYVAL fUseTextReplacements AS LONG
 , BYREF ppszCoMemText AS DWORD
 , BYREF pbDisplayAttributes AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD Discard ( ' VTable offset = 24
 BYVAL dwValueTypes AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpPhrase2 methods
 ' =====================================================================================
 METHOD GetXMLResult ( ' VTable offset = 28
 BYREF ppszCoMemXMLResult AS DWORD
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetXMLErrorInfo ( ' VTable offset = 32
 BYREF pSemanticErrorInfo AS SPSEMANTICERRORINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetAudio ( ' VTable offset = 36
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYREF ppStream AS ISpStreamFormat
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpPhrase2_INTERFACE_DEFINED__ */
' // Size = 32 bytes
TYPE SPRECORESULTTIMES ' Must be 8 byte aligned
 ftStreamTime AS FILETIME ' FILETIME
 ullLength AS QUAD ' ULONGLONG
 dwTickCount AS DWORD
 alignment__ AS DWORD ' // To keep 8 byte alignment
 ullStart AS QUAD ' ULONGLONG
END TYPE
' // Size = 4 bytes
TYPE SPSERIALIZEDRESULT DWORD
 ulSerializedSize AS DWORD ' ULONG
END TYPE
' ########################################################################################
' Interface name = ISpRecoResult
' IID = {20B053BE-E235-43CD-9A2A-8D17A48B7842}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpPhrase
' ########################################################################################
#IF NOT %DEF(%ISpRecoResult_INTERFACE_DEFINED)
 %ISpRecoResult_INTERFACE_DEFINED = 1
INTERFACE ISpRecoResult $IID_ISpRecoResult
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpPhrase Methods
 ' =====================================================================================
 METHOD GetPhrase ( ' VTable offset = 12
 BYREF ppCoMemPhrase AS SPPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetSerializedPhrase ( ' VTable offset = 16
 BYREF ppCoMemPhrase AS SPSERIALIZEDPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetText ( ' VTable offset = 20
 BYVAL ulStart AS DWORD
 , BYVAL ulCount AS DWORD
 , BYVAL fUseTextReplacements AS LONG
 , BYREF ppszCoMemText AS DWORD
 , BYREF pbDisplayAttributes AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD Discard ( ' VTable offset = 24
 BYVAL dwValueTypes AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpRecoResult Methods
 ' =====================================================================================
 METHOD GetResultTimes ( ' VTable offset = 28
 BYREF pTimes AS SPRECORESULTTIMES
 ) AS LONG
 ' =====================================================================================
 METHOD GetAlternates ( ' VTable offset = 32
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYVAL ulRequestCount AS DWORD
 , BYREF ppPhrases AS ISpPhraseAlt
 , BYREF pcPhrasesReturned AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAudio ( ' VTable offset = 36
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYREF ppStream AS ISpStreamFormat
 ) AS LONG
 ' =====================================================================================
 METHOD SpeakAudio ( ' VTable offset = 40
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF pulStreamNumber AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Serialize ( ' VTable offset = 44
 BYREF ppCoMemSerializedResult AS SPSERIALIZEDRESULT
 ) AS LONG
 ' =====================================================================================
 METHOD ScaleAudio ( ' VTable offset = 48
 BYREF pAudioFormatId AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD GetRecoContext ( ' VTable offset = 52
 BYREF ppRecoContext AS ISpRecoContext
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRecoResult_INTERFACE_DEFINED__ */
' enum SPCOMMITFLAGS
%EQUATE `SPCF_NONE = 0
%EQUATE `SPCF_ADD_TO_USER_LEXICON = 1 ' 1 << 0
%EQUATE `SPCF_DEFINITE_CORRECTION = 2 ' 1 << 1
' ########################################################################################
' Interface name = ISpRecoResult2
' IID = 27CAC6C4-88F2-41F2-8817-0C95E59F1E6E
' Inherited interface = ISpRecoResult
' ########################################################################################
#IF NOT %DEF(%ISpRecoResult2_INTERFACE_DEFINED)
 %ISpRecoResult2_INTERFACE_DEFINED = 1
INTERFACE ISpRecoResult2 $IID_ISpRecoResult2
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpPhrase methods
 ' =====================================================================================
 METHOD GetPhrase ( ' VTable offset = 12
 BYREF ppCoMemPhrase AS SPPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetSerializedPhrase ( ' VTable offset = 16
 BYREF ppCoMemPhrase AS SPSERIALIZEDPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetText ( ' VTable offset = 20
 BYVAL ulStart AS DWORD
 , BYVAL ulCount AS DWORD
 , BYVAL fUseTextReplacements AS LONG
 , BYREF ppszCoMemText AS DWORD
 , BYREF pbDisplayAttributes AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD Discard ( ' VTable offset = 24
 BYVAL dwValueTypes AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpRecoResult Methods
 ' =====================================================================================
 METHOD GetResultTimes ( ' VTable offset = 28
 BYREF pTimes AS SPRECORESULTTIMES
 ) AS LONG
 ' =====================================================================================
 METHOD GetAlternates ( ' VTable offset = 32
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYVAL ulRequestCount AS DWORD
 , BYREF ppPhrases AS ISpPhraseAlt
 , BYREF pcPhrasesReturned AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAudio ( ' VTable offset = 36
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYREF ppStream AS ISpStreamFormat
 ) AS LONG
 ' =====================================================================================
 METHOD SpeakAudio ( ' VTable offset = 40
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF pulStreamNumber AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Serialize ( ' VTable offset = 44
 BYREF ppCoMemSerializedResult AS SPSERIALIZEDRESULT
 ) AS LONG
 ' =====================================================================================
 METHOD ScaleAudio ( ' VTable offset = 48
 BYREF pAudioFormatId AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD GetRecoContext ( ' VTable offset = 52
 BYREF ppRecoContext AS ISpRecoContext
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpRecoResult2 Methods
 ' =====================================================================================
 METHOD CommitAlternate ( ' VTable offset = 56
 BYVAL pPhraseAlt AS ISpPhraseAlt
 , BYREF ppNewResult AS ISpRecoResult
 ) AS LONG
 ' =====================================================================================
 METHOD CommitText ( ' VTable offset = 60
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYREF pszCorrectedData AS WSTRINGZ
 , BYVAL eCommitFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetTextFeedback ( ' VTable offset = 64
 BYREF pszFeedback AS WSTRINGZ
 , BYVAL fSuccessful AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRecoResult2_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpXMLRecoResult
' IID = AE39362B-45A8-4074-9B9E-CCF49AA2D0B6
' Inherited interface = ISpRecoResult
' ########################################################################################
#IF NOT %DEF(%ISpXMLRecoResult_INTERFACE_DEFINED)
 %ISpXMLRecoResult_INTERFACE_DEFINED = 1
INTERFACE ISpXMLRecoResult $IID_ISpXMLRecoResult
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpPhrase methods
 ' =====================================================================================
 METHOD GetPhrase ( ' VTable offset = 12
 BYREF ppCoMemPhrase AS SPPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetSerializedPhrase ( ' VTable offset = 16
 BYREF ppCoMemPhrase AS SPSERIALIZEDPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD GetText ( ' VTable offset = 20
 BYVAL ulStart AS DWORD
 , BYVAL ulCount AS DWORD
 , BYVAL fUseTextReplacements AS LONG
 , BYREF ppszCoMemText AS DWORD
 , BYREF pbDisplayAttributes AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD Discard ( ' VTable offset = 24
 BYVAL dwValueTypes AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpRecoResult Methods
 ' =====================================================================================
 METHOD GetResultTimes ( ' VTable offset = 28
 BYREF pTimes AS SPRECORESULTTIMES
 ) AS LONG
 ' =====================================================================================
 METHOD GetAlternates ( ' VTable offset = 32
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYVAL ulRequestCount AS DWORD
 , BYREF ppPhrases AS ISpPhraseAlt
 , BYREF pcPhrasesReturned AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAudio ( ' VTable offset = 36
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYREF ppStream AS ISpStreamFormat
 ) AS LONG
 ' =====================================================================================
 METHOD SpeakAudio ( ' VTable offset = 40
 BYVAL ulStartElement AS DWORD
 , BYVAL cElements AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF pulStreamNumber AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Serialize ( ' VTable offset = 44
 BYREF ppCoMemSerializedResult AS SPSERIALIZEDRESULT
 ) AS LONG
 ' =====================================================================================
 METHOD ScaleAudio ( ' VTable offset = 48
 BYREF pAudioFormatId AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD GetRecoContext ( ' VTable offset = 52
 BYREF ppRecoContext AS ISpRecoContext
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpXMLRecoResult Methods
 ' =====================================================================================
 METHOD GetXMLResult ( ' VTable offset = 56
 BYVAL ppszCoMemXMLResult AS DWORD
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetXMLErrorInfo ( ' VTable offset = 60
 BYREF pSemanticErrorInfo AS SPSEMANTICERRORINFO
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpXMLRecoResult_INTERFACE_DEFINED__ */
' // Size = 16 bytes
TYPE SPTEXTSELECTIONINFO DWORD
 ulStartActiveOffset AS DWORD ' ULONG
 cchActiveChars AS DWORD ' ULONG
 ulStartSelection AS DWORD ' ULONG
 cchSelection AS DWORD ' ULONG
END TYPE
' enum SPWORDPRONOUNCEABLE
%EQUATE `SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE = 0
%EQUATE `SPWP_UNKNOWN_WORD_PRONOUNCEABLE = 1
%EQUATE `SPWP_KNOWN_WORD_PRONOUNCEABLE = 2
' enum SPGRAMMARSTATE
%EQUATE `SPGS_DISABLED = 0
%EQUATE `SPGS_ENABLED = 1
%EQUATE `SPGS_EXCLUSIVE = 3
' enum SPCONTEXTSTATE
%EQUATE `SPCS_DISABLED = 0
%EQUATE `SPCS_ENABLED = 1
' enum SPRULESTATE
%EQUATE `SPRS_INACTIVE = 0
%EQUATE `SPRS_ACTIVE = 1
%EQUATE `SPRS_ACTIVE_WITH_AUTO_PAUSE = 3
%EQUATE `SPRS_ACTIVE_USER_DELIMITED = 4
%EQUATE `SP_STREAMPOS_ASAP = 0
%EQUATE `SP_STREAMPOS_REALTIME = -1
%EQUATE `SPRULETRANS_TEXTBUFFER = &HFFFFFFFF ' (SPSTATEHANDLE)(-1)
%EQUATE `SPRULETRANS_WILDCARD = &HFFFFFFFE ' (SPSTATEHANDLE)(-2)
%EQUATE `SPRULETRANS_DICTATION = &HFFFFFFFD ' (SPSTATEHANDLE)(-3)
' enum SPGRAMMARWORDTYPE
%EQUATE `SPWT_DISPLAY = 0
%EQUATE `SPWT_LEXICAL = %SPWT_DISPLAY + 1
%EQUATE `SPWT_PRONUNCIATION = %SPWT_LEXICAL + 1
%EQUATE `SPWT_LEXICAL_NO_SPECIAL_CHARS = %SPWT_PRONUNCIATION + 1
' // Size = 32 bytes
TYPE SPPROPERTYINFO ' Must be 8 byte aligned
 pszName AS WSTRINGZ PTR ' const WCHAR *
 ulId AS DWORD ' ULONG
 pszValue AS WSTRINGZ PTR ' const WCHAR *
 alignment__ AS DWORD ' // To keep 8 byte alignment
 vValue AS tagVARIANT ' VARIANT
END TYPE
' enum SPCFGRULEATTRIBUTES
%EQUATE `SPRAF_TopLevel = &H1 ' 1 << 0
%EQUATE `SPRAF_Active = &H2 ' 1 << 1
%EQUATE `SPRAF_Export = &H4 ' 1 << 2
%EQUATE `SPRAF_Import = &H8 ' 1 << 3
%EQUATE `SPRAF_Interpreter = &H10 ' 1 << 4
%EQUATE `SPRAF_Dynamic = &H20 ' 1 << 5
%EQUATE `SPRAF_Root = &H40 ' 1 << 6
%EQUATE `SPRAF_AutoPause = &H10000 ' 1 << 16
%EQUATE `SPRAF_UserDelimited = &H20000 ' 1 << 17
' ########################################################################################
' Interface name = ISpGrammarBuilder
' IID = {8137828F-591A-4A42-BE58-49EA7EBAAC68}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpGrammarBuilder_INTERFACE_DEFINED)
 %ISpGrammarBuilder_INTERFACE_DEFINED = 1
INTERFACE ISpGrammarBuilder $IID_ISpGrammarBuilder
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ResetGrammar ( ' VTable offset = 12
 BYVAL NewLanguage AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRule ( ' VTable offset = 16
 BYREF pszRuleName AS WSTRINGZ
 , BYVAL dwRuleId AS DWORD
 , BYVAL dwAttributes AS DWORD
 , BYVAL fCreateIfNotExist AS LONG
 , BYREF phInitialState AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ClearRule ( ' VTable offset = 20
 BYVAL hState AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CreateNewState ( ' VTable offset = 24
 BYVAL hState AS DWORD
 , BYREF phState AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddWordTransition ( ' VTable offset = 28
 BYVAL hFromState AS DWORD
 , BYVAL hToState AS DWORD
 , BYREF psz AS WSTRINGZ
 , BYREF pszSeparators AS WSTRINGZ
 , BYVAL eWordType AS LONG
 , BYVAL Weight AS SINGLE
 , BYREF pPropInfo AS SPPROPERTYINFO
 ) AS LONG
 ' =====================================================================================
 METHOD AddRuleTransition ( ' VTable offset = 32
 BYVAL hFromState AS DWORD
 , BYVAL hToState AS DWORD
 , BYVAL hRule AS DWORD
 , BYVAL Weight AS SINGLE
 , BYREF pPropInfo AS SPPROPERTYINFO
 ) AS LONG
 ' =====================================================================================
 METHOD AddResource ( ' VTable offset = 36
 BYVAL hRuleState AS DWORD
 , BYREF pszResourceName AS WSTRINGZ
 , BYREF pszResourceValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 40
 BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpGrammarBuilder_INTERFACE_DEFINED__ */
' enum SPLOADOPTIONS
%EQUATE `SPLO_STATIC = 0
%EQUATE `SPLO_DYNAMIC = 1
' ########################################################################################
' Interface name = ISpRecoGrammar
' IID = {2177DB29-7F45-47D0-8554-067E91C80502}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpGrammarBuilder
' ########################################################################################
#IF NOT %DEF(%ISpRecoGrammar_INTERFACE_DEFINED)
 %ISpRecoGrammar_INTERFACE_DEFINED = 1
INTERFACE ISpRecoGrammar $IID_ISpRecoGrammar
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpGrammarBuilder Methods
 ' =====================================================================================
 METHOD ResetGrammar ( ' VTable offset = 12
 BYVAL NewLanguage AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRule ( ' VTable offset = 16
 BYREF pszRuleName AS WSTRINGZ
 , BYVAL dwRuleId AS DWORD
 , BYVAL dwAttributes AS DWORD
 , BYVAL fCreateIfNotExist AS LONG
 , BYREF phInitialState AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ClearRule ( ' VTable offset = 20
 BYVAL hState AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CreateNewState ( ' VTable offset = 24
 BYVAL hState AS DWORD
 , BYREF phState AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddWordTransition ( ' VTable offset = 28
 BYVAL hFromState AS DWORD
 , BYVAL hToState AS DWORD
 , BYREF psz AS WSTRINGZ
 , BYREF pszSeparators AS WSTRINGZ
 , BYVAL eWordType AS LONG
 , BYVAL Weight AS SINGLE
 , BYREF pPropInfo AS SPPROPERTYINFO
 ) AS LONG
 ' =====================================================================================
 METHOD AddRuleTransition ( ' VTable offset = 32
 BYVAL hFromState AS DWORD
 , BYVAL hToState AS DWORD
 , BYVAL hRule AS DWORD
 , BYVAL Weight AS SINGLE
 , BYREF pPropInfo AS SPPROPERTYINFO
 ) AS LONG
 ' =====================================================================================
 METHOD AddResource ( ' VTable offset = 36
 BYVAL hRuleState AS DWORD
 , BYREF pszResourceName AS WSTRINGZ
 , BYREF pszResourceValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 40
 BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpRecoGrammar Methods
 ' =====================================================================================
 METHOD GetGrammarId ( ' VTable offset = 44
 BYREF pullGrammarId AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRecoContext ( ' VTable offset = 48
 BYREF ppRecoCtxt AS ISpRecoContext
 ) AS LONG
 ' =====================================================================================
 METHOD LoadCmdFromFile ( ' VTable offset = 52
 BYREF pszFileName AS WSTRINGZ
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LoadCmdFromObject ( ' VTable offset = 56
 BYREF rcid AS GUID
 , BYREF pszGrammarName AS WSTRINGZ
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LoadCmdFromResource ( ' VTable offset = 60
 BYVAL hModule AS DWORD
 , BYREF pszResourceName AS WSTRINGZ
 , BYREF pszResourceType AS WSTRINGZ
 , BYVAL wLanguage AS WORD
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LoadCmdFromMemory ( ' VTable offset = 64
 BYREF pGrammar AS SPBINARYGRAMMAR
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LoadCmdFromProprietaryGrammar ( ' VTable offset = 68
 BYREF rguidParam AS GUID
 , BYREF pszStringParam AS WSTRINGZ
 , BYVAL pvDataPrarm AS DWORD
 , BYVAL cbDataSize AS DWORD
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetRuleState ( ' VTable offset = 72
 BYREF pszName AS WSTRINGZ
 , BYVAL pReserved AS DWORD
 , BYVAL NewState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetRuleIdState ( ' VTable offset = 76
 BYVAL ulRuleId AS DWORD
 , BYVAL NewState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LoadDictation ( ' VTable offset = 80
 BYREF pszTopicName AS WSTRINGZ
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD UnloadDictation ( ' VTable offset = 84
 ) AS LONG
 ' =====================================================================================
 METHOD SetDictationState ( ' VTable offset = 88
 BYVAL NewState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetWordSequenceData ( ' VTable offset = 92
 BYREF pText AS WSTRINGZ
 , BYVAL cchText AS DWORD
 , BYREF pInfo AS SPTEXTSELECTIONINFO
 ) AS LONG
 ' =====================================================================================
 METHOD SetTextSelection ( ' VTable offset = 96
 BYREF pInfo AS SPTEXTSELECTIONINFO
 ) AS LONG
 ' =====================================================================================
 METHOD IsPronounceable ( ' VTable offset = 100
 BYREF pszWord AS WSTRINGZ
 , BYREF pWordPronounceable AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetGrammarState ( ' VTable offset = 104
 BYVAL eGrammarState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SaveCmd ( ' VTable offset = 108
 BYVAL pStream AS IStream
 , OPTIONAL BYREF ppszCoMemErrorText AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetGrammarState ( ' VTable offset = 112
 BYREF peGrammarState AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRecoGrammar_INTERFACE_DEFINED__ */
' enum SPMATCHINGMODE
%EQUATE `AllWords = 0
%EQUATE `Subsequence = 1
%EQUATE `OrderedSubset = 3
%EQUATE `SubsequenceContentRequired = 5
%EQUATE `OrderedSubsetContentRequired = 7
' enum PHONETICALPHABET
%EQUATE `PA_Ipa = 0
%EQUATE `PA_Ups = 1
%EQUATE `PA_Sapi = 2
' ########################################################################################
' Interface name = ISpGrammarBuilder2
' IID = 8AB10026-20CC-4B20-8C22-A49C9BA78F60
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpGrammarBuilder2_INTERFACE_DEFINED)
 %ISpGrammarBuilder2_INTERFACE_DEFINED = 1
INTERFACE ISpGrammarBuilder2 $IID_ISpGrammarBuilder2
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AddTextSubset ( ' VTable offset = 12
 BYVAL hFromState AS DWORD
 , BYVAL hToState AS DWORD
 , BYREF psz AS WSTRINGZ
 , BYVAL eMatchMode AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetPhoneticAlphabet ( ' VTable offset = 16
 BYVAL phoneticALphabet AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpGrammarBuilder2_INTERFACE_DEFINED__ */
%EQUATE `SPRP_NORMAL = 0
' ########################################################################################
' Interface name = ISpRecoGrammar2
' IID = 4B37BC9E-9ED6-44A3-93D3-18F022B79EC3
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpRecoGrammar2_INTERFACE_DEFINED)
 %ISpRecoGrammar2_INTERFACE_DEFINED = 1
INTERFACE ISpRecoGrammar2 $IID_ISpRecoGrammar2
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetRules ( ' VTable offset = 12
 BYREF ppCoMemRules AS SPRULE
 , BYREF puNumRules AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD LoadCmdFromFile2 ( ' VTable offset = 16
 BYREF pszFileName AS WSTRINGZ
 , BYVAL Options AS LONG
 , BYREF pszSharingUri AS WSTRINGZ
 , BYREF pszBaseUri AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD LoadCmdFromMemory2 ( ' VTable offset = 20
 BYREF pGrammar AS SPBINARYGRAMMAR
 , BYVAL Options AS LONG
 , BYREF pszSharingUri AS WSTRINGZ
 , BYREF pszBaseUri AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetRulePriority ( ' VTable offset = 24
 BYREF pszRuleName AS WSTRINGZ
 , BYVAL ulRuleId AS DWORD
 , BYVAL nRulePriority AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetRuleWeight ( ' VTable offset = 28
 BYREF pszRuleName AS WSTRINGZ
 , BYVAL ulRuleId AS DWORD
 , BYVAL flWeight AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetDictationWeight ( ' VTable offset = 32
 BYVAL flWeight AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGrammarLoader ( ' VTable offset = 36
 BYVAL pLoader AS ISpeechResourceLoader
 ) AS LONG
 ' =====================================================================================
 METHOD SetSMLSecurityManager ( ' VTable offset = 40
 BYVAL pSMLSecurityManager AS IInternetSecurityManager
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRecoGrammar2_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechResourceLoader
' IID = B9AC5783-FCD0-4B21-B119-B4F8DA8FD2C3
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechResourceLoader_INTERFACE_DEFINED)
 %ISpeechResourceLoader_INTERFACE_DEFINED = 1
INTERFACE ISpeechResourceLoader $IID_ISpeechResourceLoader
 INHERIT IDispatch
 ' =====================================================================================
 METHOD LoadResource <1> ( ' VTable offset = 28
 BYVAL bstrResourceUri AS WSTRING
 , BYVAL fAlwaysReload AS INTEGER
 , BYREF pStream AS IStream
 , BYREF pbstrMIMEType AS WSTRING
 , BYREF pfModified AS INTEGER
 , BYREF pbstrRedirectUrl AS WSTRING
 ) ' void
 ' =====================================================================================
 METHOD GetLocalCopy <2> ( ' VTable offset = 32
 BYVAL bstrResourceUri AS WSTRING
 , BYREF pbstrLocalPath AS WSTRING
 , BYREF pbstrMIMEType AS WSTRING
 , BYREF pbstrRedirectUrl AS WSTRING
 ) ' void
 ' =====================================================================================
 METHOD ReleaseLocalCopy <3> ( ' VTable offset = 36
 BYVAL pbstrLocalPath AS WSTRING
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechResourceLoader_INTERFACE_DEFINED__ */
' // Size = 524 bytes
TYPE SPRECOCONTEXTSTATUS DWORD
 eInterference AS LONG ' SPINTERFERENCE enum
 szRequestTypeOfUI AS WSTRINGZ * 255 ' WCHAR [ 255 ]
 dwReserved1 AS DWORD
 dwReserved2 AS DWORD
END TYPE
' enum SPBOOKMARKOPTIONS
%EQUATE `SPBO_NONE = 0
%EQUATE `SPBO_PAUSE = 1 ' 1 << 0
%EQUATE `SPBO_AHEAD = 2 ' 1 << 1
%EQUATE `SPBO_TIME_UNITS = 4 ' 1 << 2
' enum SPAUDIOOPTIONS
%EQUATE `SPAO_NONE = 0
%EQUATE `SPAO_RETAIN_AUDIO = 1 ' 1 << 0
' ########################################################################################
' Interface name = ISpRecoContext
' IID = {F740A62F-7C15-489E-8234-940A33D9272D}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpEventSource
' ########################################################################################
#IF NOT %DEF(%ISpRecoContext_INTERFACE_DEFINED)
 %ISpRecoContext_INTERFACE_DEFINED = 1
INTERFACE ISpRecoContext $IID_ISpRecoContext
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpNotifySource Methods
 ' =====================================================================================
 METHOD SetNotifySink ( ' VTable offset = 12
 BYVAL pNotifySink AS ISpNotifySink
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyWindowMessage ( ' VTable offset = 16
 BYVAL hWnd AS DWORD
 , BYVAL Msg AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyCallbackFunction ( ' VTable offset = 20
 BYVAL pfnCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyCallbackInterface ( ' VTable offset = 24
 BYVAL pSpCallback AS DWORD
 , BYVAL wParam AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetNotifyWin32Event ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD WaitForNotifyEvent ( ' VTable offset = 32
 BYVAL dwMilliseconds AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNotifyEventHandle ( ' VTable offset = 36
 ) AS DWORD
 ' =====================================================================================
 ' =====================================================================================
 ' ISpEventSource Methods
 ' =====================================================================================
 METHOD SetInterest ( ' VTable offset = 40
 BYVAL ullEventInterest AS QUAD
 , BYVAL ullQueuedInterest AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetEvents ( ' VTable offset = 44
 BYVAL ulCount AS DWORD
 , BYREF pEventArray AS SPEVENT
 , BYREF pulFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetInfo ( ' VTable offset = 48
 BYREF pInfo AS SPEVENTSOURCEINFO
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpRecoContext Methods
 ' =====================================================================================
 METHOD GetRecognizer ( ' VTable offset = 52
 BYREF ppRecognizer AS ISpRecognizer
 ) AS LONG
 ' =====================================================================================
 METHOD CreateGrammar ( ' VTable offset = 56
 BYVAL ullGrammarId AS QUAD
 , BYREF ppGrammar AS ISpRecoGrammar
 ) AS LONG
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 60
 BYREF pStatus AS SPRECOCONTEXTSTATUS
 ) AS LONG
 ' =====================================================================================
 METHOD GetMaxAlternates ( ' VTable offset = 64
 BYREF pcAlternates AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetMaxAlternates ( ' VTable offset = 68
 BYVAL cAlternates AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetAudioOptions ( ' VTable offset = 72
 BYVAL Options AS LONG
 , BYREF pAudioFormatId AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD GetAudioOptions ( ' VTable offset = 76
 BYVAL pOptions AS LONG
 , BYREF pAudioFormatId AS GUID
 , BYREF ppCoMemWFEX AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD DeserializeResult ( ' VTable offset = 80
 BYREF pSerializedResult AS SPSERIALIZEDRESULT
 , BYREF ppResult AS ISpRecoResult
 ) AS LONG
 ' =====================================================================================
 METHOD Bookmark ( ' VTable offset = 84
 BYVAL Options AS LONG
 , BYVAL ullStreamPosition AS QUAD
 , BYVAL lparamEvent AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetAdaptationData ( ' VTable offset = 88
 BYREF pAdaptationData AS WSTRINGZ
 , BYVAL cch AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Pause ( ' VTable offset = 92
 BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Resume ( ' VTable offset = 96
 BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetVoice ( ' VTable offset = 100
 BYVAL pVoice AS ISpVoice
 , BYVAL fAllowFormatChanges AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetVoice ( ' VTable offset = 104
 BYREF ppVoice AS ISpVoice
 ) AS LONG
 ' =====================================================================================
 METHOD SetVoicePurgeEvent ( ' VTable offset = 108
 BYVAL ullEventInterest AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetVoicePurgeEvent ( ' VTable offset = 112
 BYREF pullEventInterest AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetContextState ( ' VTable offset = 116
 BYVAL eContextState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetContextState ( ' VTable offset = 120
 BYVAL peContextState AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRecoContext_INTERFACE_DEFINED__ */
' enum SPGRAMMAROPTIONS
%EQUATE `SPGO_SAPI = &H1
%EQUATE `SPGO_SRGS = &H2
%EQUATE `SPGO_UPS = &H4
%EQUATE `SPGO_SRGS_MS_SCRIPT = &H8
%EQUATE `SPGO_SRGS_W3C_SCRIPT = &H100
%EQUATE `SPGO_SRGS_STG_SCRIPT = &H200
%EQUATE `SPGO_SRGS_SCRIPT = (((%SPGO_SRGS OR %SPGO_SRGS_MS_SCRIPT) OR %SPGO_SRGS_W3C_SCRIPT) OR %SPGO_SRGS_STG_SCRIPT)
%EQUATE `SPGO_FILE = &H10
%EQUATE `SPGO_HTTP = &H20
%EQUATE `SPGO_RES = &H40
%EQUATE `SPGO_OBJECT = &H80
%EQUATE `SPGO_DEFAULT = &H3fb
%EQUATE `SPGO_ALL = &H3ff
' enum SPADAPTATIONSETTINGS
%EQUATE `SPADS_Default = 0
%EQUATE `SPADS_CurrentRecognizer = &H1
%EQUATE `SPADS_RecoProfile = &H2
%EQUATE `SPADS_Immediate = &H4
%EQUATE `SPADS_Reset = &H8
%EQUATE `SPADS_HighVolumeDataSource = &H10
' enum SPADAPTATIONRELEVANCE
%EQUATE `SPAR_Unknown = 0
%EQUATE `SPAR_Low = 1
%EQUATE `SPAR_Medium = 2
%EQUATE `SPAR_High = 3
' ########################################################################################
' Interface name = ISpRecoContext2
' IID = BEAD311C-52FF-437F-9464-6B21054CA73D
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpRecoContext2_INTERFACE_DEFINED)
 %ISpRecoContext2_INTERFACE_DEFINED = 1
INTERFACE ISpRecoContext2 $IID_ISpRecoContext2
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetGrammarOptions ( ' VTable offset = 12
 BYVAL eGrammarOptions AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetGrammarOptions ( ' VTable offset = 16
 BYREF peGrammarOptions AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetAdaptationData2 ( ' VTable offset = 20
 BYREF pAdaptationData AS WSTRINGZ
 , BYVAL cch AS DWORD
 , BYREF pTopicName AS WSTRINGZ
 , BYVAL eAdaptationSettings AS DWORD
 , BYVAL eRelevance AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRecoContext2_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpProperties
' IID = {5B4FB971-B115-4DE1-AD97-E482E3BF6EE4}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpProperties_INTERFACE_DEFINED)
 %ISpProperties_INTERFACE_DEFINED = 1
INTERFACE ISpProperties $IID_ISpProperties
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetPropertyNum ( ' VTable offset = 12
 BYREF pName AS WSTRINGZ
 , BYVAL lValue AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyNum ( ' VTable offset = 16
 BYREF pName AS WSTRINGZ
 , BYREF plValue AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetPropertyString ( ' VTable offset = 20
 BYREF pName AS WSTRINGZ
 , BYREF pValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyString ( ' VTable offset = 24
 BYREF pName AS WSTRINGZ
 , BYREF ppCoMemValue AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpProperties_INTERFACE_DEFINED__ */
%EQUATE `SP_MAX_LANGIDS = 20
' // Size = 128 bytes
TYPE SPRECOGNIZERSTATUS ' Must be 8 byte aligned
 AudioStatus AS SPAUDIOSTATUS ' SPAUDIOSTATUS
 ullRecognitionStreamPos AS QUAD ' ULONGLONG
 ulStreamNumber AS DWORD ' ULONG
 ulNumActive AS DWORD ' ULONG
 ClsidEngine AS GUID ' GUID
 cLangIDs AS DWORD ' ULONG
 alignment__ AS DWORD ' // To keep 8 byte alignment
 aLangID(19) AS WORD ' WORD [ 20 ]
 ullRecognitionStreamTime AS QUAD ' ULONGLONG
END TYPE
' enum SPWAVEFORMATTYPE
%EQUATE `SPWF_INPUT = 0
%EQUATE `SPWF_SRENGINE = %SPWF_INPUT + 1
' enum SPRECOSTATE
%EQUATE `SPRST_INACTIVE = 0
%EQUATE `SPRST_ACTIVE = %SPRST_INACTIVE + 1
%EQUATE `SPRST_ACTIVE_ALWAYS = %SPRST_ACTIVE + 1
%EQUATE `SPRST_INACTIVE_WITH_PURGE = %SPRST_ACTIVE_ALWAYS + 1
%EQUATE `SPRST_NUM_STATES = %SPRST_INACTIVE_WITH_PURGE + 1
' ########################################################################################
' Interface name = ISpRecognizer
' IID = {C2B5F241-DAA0-4507-9E16-5A1EAA2B7A5C}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpProperties
' ########################################################################################
#IF NOT %DEF(%ISpRecognizer_INTERFACE_DEFINED)
 %ISpRecognizer_INTERFACE_DEFINED = 1
INTERFACE ISpRecognizer $IID_ISpRecognizer
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpProperties Methods
 ' =====================================================================================
 METHOD SetPropertyNum ( ' VTable offset = 12
 BYREF pName AS WSTRINGZ
 , BYVAL lValue AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyNum ( ' VTable offset = 16
 BYREF pName AS WSTRINGZ
 , BYREF plValue AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetPropertyString ( ' VTable offset = 20
 BYREF pName AS WSTRINGZ
 , BYREF pValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyString ( ' VTable offset = 24
 BYREF pName AS WSTRINGZ
 , BYREF ppCoMemValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpRecognizer Methods
 ' =====================================================================================
 METHOD SetRecognizer ( ' VTable offset = 28
 BYVAL pRecognizer AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD GetRecognizer ( ' VTable offset = 32
 BYREF ppRecognizer AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD SetInput ( ' VTable offset = 36
 BYVAL pUnkInput AS IUnknown
 , BYVAL fAllowFormatChanges AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetInputObjectToken ( ' VTable offset = 40
 BYREF ppToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD GetInputStream ( ' VTable offset = 44
 BYREF ppStream AS ISpStreamFormat
 ) AS LONG
 ' =====================================================================================
 METHOD CreateRecoContext ( ' VTable offset = 48
 BYREF ppNewCtxt AS ISpRecoContext
 ) AS LONG
 ' =====================================================================================
 METHOD GetRecoProfile ( ' VTable offset = 52
 BYREF ppToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD SetRecoProfile ( ' VTable offset = 56
 BYVAL pToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD IsSharedInstance ( ' VTable offset = 60
 ) AS LONG
 ' =====================================================================================
 METHOD GetRecoState ( ' VTable offset = 64
 BYREF pState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetRecoState ( ' VTable offset = 68
 BYVAL NewState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 72
 BYREF pStatus AS SPRECOGNIZERSTATUS
 ) AS LONG
 ' =====================================================================================
 METHOD GetFormat ( ' VTable offset = 76
 BYVAL WaveFormatType AS LONG
 , BYREF pFormatId AS GUID
 , BYREF ppCoMemWFEX AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD IsUISupported ( ' VTable offset = 80
 BYREF pszTypeOfUI AS WSTRINGZ
 , BYVAL pvExtraData AS DWORD
 , BYVAL cbExtraData AS DWORD
 , BYREF pfSupported AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD DisplayUI ( ' VTable offset = 84
 BYVAL hwndParent AS DWORD
 , BYREF pszTitle AS WSTRINGZ
 , BYREF pszTypeOfUI AS WSTRINGZ
 , BYVAL pvExtraData AS DWORD
 , BYVAL cbExtraData AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EmulateRecognition ( ' VTable offset = 88
 BYVAL pPhrase AS ISpPhrase
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRecognizer_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpSerializeState
' IID = 21B501A0-0EC7-46C9-92C3-A2BC784C54B9
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpSerializeState_INTERFACE_DEFINED)
 %ISpSerializeState_INTERFACE_DEFINED = 1
INTERFACE ISpSerializeState $IID_ISpSerializeState
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetSerializedState ( ' VTable offset = 12
 BYREF ppbData AS DWORD
 , BYREF pulSize AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSerializedState ( ' VTable offset = 16
 BYVAL pbData AS BYTE PTR
 , BYVAL ulSize AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpSerializeState_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpRecognizer2
' IID = 8FC6D974-C81E-4098-93C5-0147F61ED4D3
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpRecognizer2_INTERFACE_DEFINED)
 %ISpRecognizer2_INTERFACE_DEFINED = 1
INTERFACE ISpRecognizer2 $IID_ISpRecognizer2
 INHERIT IUnknown
 ' =====================================================================================
 METHOD EmulateRecognitionEx ( ' VTable offset = 12
 BYVAL pPhrase AS ISpPhrase
 , BYVAL dwCompareFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetTrainingState ( ' VTable offset = 16
 BYVAL fDoingTraining AS LONG
 , BYVAL fAdaptFromTrainingData AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD ResetAcousticModelAdaptation ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRecognizer2_INTERFACE_DEFINED__ */
' enum SPCATEGORYTYPE
%EQUATE `SPCT_COMMAND = 0
%EQUATE `SPCT_DICTATION = %SPCT_COMMAND + 1
%EQUATE `SPCT_SLEEP = %SPCT_DICTATION + 1
%EQUATE `SPCT_SUB_COMMAND = %SPCT_SLEEP + 1
%EQUATE `SPCT_SUB_DICTATION = %SPCT_SUB_COMMAND + 1
' ########################################################################################
' Interface name = ISpRecoCategory
' IID = {DA0CD0F9-14A2-4F09-8C2A-85CC48979345}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpRecoCategory_INTERFACE_DEFINED)
 %ISpRecoCategory_INTERFACE_DEFINED = 1
INTERFACE ISpRecoCategory $IID_ISpRecoCategory
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetType ( ' VTable offset = 12
 BYREF peCategoryType AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRecoCategory_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpRecognizer3
' IID = {DF1B943C-5838-4AA2-8706-D7CD5B333499}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpRecognizer3_INTERFACE_DEFINED)
 %ISpRecognizer3_INTERFACE_DEFINED = 1
INTERFACE ISpRecognizer3 $IID_ISpRecognizer3
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCategory ( ' VTable offset = 12
 BYVAL categoryType AS LONG
 , BYREF ppCategory AS ISpRecoCategory
 ) AS LONG
 ' =====================================================================================
 METHOD SetActiveCategory ( ' VTable offset = 16
 BYVAL pCategory AS ISpRecoCategory
 ) AS LONG
 ' =====================================================================================
 METHOD GetActiveCategory ( ' VTable offset = 20
 BYREF ppCategory AS ISpRecoCategory
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpRecognizer3_INTERFACE_DEFINED__ */
' // Size = 8 bytes
TYPE SPNORMALIZATIONLIST DWORD
 ulSize AS DWORD ' ULONG
 ppszzNormalizedList AS WSTRINGZ PTR ' WCHAR **
END TYPE
' ########################################################################################
' Interface name = ISpEnginePronunciation
' IID = C360CE4B-76D1-4214-AD68-52657D5083DA
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpEnginePronunciation_INTERFACE_DEFINED)
 %ISpEnginePronunciation_INTERFACE_DEFINED = 1
INTERFACE ISpEnginePronunciation $IID_ISpEnginePronunciation
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Normalize ( ' VTable offset = 12
 BYREF pszWord AS WSTRINGZ
 , BYREF pszLeftContext AS WSTRINGZ
 , BYREF pszRightContext AS WSTRINGZ
 , BYVAL LangID AS WORD
 , BYREF pNormalizationList AS SPNORMALIZATIONLIST
 ) AS LONG
 ' =====================================================================================
 METHOD GetPronunciations ( ' VTable offset = 16
 BYREF pszWord AS WSTRINGZ
 , BYREF pszLeftContext AS WSTRINGZ
 , BYREF pszRightContext AS WSTRINGZ
 , BYVAL LangID AS WORD
 , BYREF pEnginePronunciationList AS SPWORDPRONUNCIATIONLIST
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpEnginePronunciation_INTERFACE_DEFINED__ */
#IF NOT %DEF(%SpeechLib_LIBRARY_DEFINED)
 %SpeechLib_LIBRARY_DEFINED = 1
'typedef long SpeechLanguageId;
' enum DISPID_SpeechDataKey
%EQUATE `DISPID_SDKSetBinaryValue = 1
%EQUATE `DISPID_SDKGetBinaryValue = %DISPID_SDKSetBinaryValue + 1
%EQUATE `DISPID_SDKSetStringValue = %DISPID_SDKGetBinaryValue + 1
%EQUATE `DISPID_SDKGetStringValue = %DISPID_SDKSetStringValue + 1
%EQUATE `DISPID_SDKSetLongValue = %DISPID_SDKGetStringValue + 1
%EQUATE `DISPID_SDKGetlongValue = %DISPID_SDKSetLongValue + 1
%EQUATE `DISPID_SDKOpenKey = %DISPID_SDKGetlongValue + 1
%EQUATE `DISPID_SDKCreateKey = %DISPID_SDKOpenKey + 1
%EQUATE `DISPID_SDKDeleteKey = %DISPID_SDKCreateKey + 1
%EQUATE `DISPID_SDKDeleteValue = %DISPID_SDKDeleteKey + 1
%EQUATE `DISPID_SDKEnumKeys = %DISPID_SDKDeleteValue + 1
%EQUATE `DISPID_SDKEnumValues = %DISPID_SDKEnumKeys + 1
' enum DISPID_SpeechObjectToken
%EQUATE `DISPID_SOTId = 1
%EQUATE `DISPID_SOTDataKey = %DISPID_SOTId + 1
%EQUATE `DISPID_SOTCategory = %DISPID_SOTDataKey + 1
%EQUATE `DISPID_SOTGetDescription = %DISPID_SOTCategory + 1
%EQUATE `DISPID_SOTSetId = %DISPID_SOTGetDescription + 1
%EQUATE `DISPID_SOTGetAttribute = %DISPID_SOTSetId + 1
%EQUATE `DISPID_SOTCreateInstance = %DISPID_SOTGetAttribute + 1
%EQUATE `DISPID_SOTRemove = %DISPID_SOTCreateInstance + 1
%EQUATE `DISPID_SOTGetStorageFileName = %DISPID_SOTRemove + 1
%EQUATE `DISPID_SOTRemoveStorageFileName = %DISPID_SOTGetStorageFileName + 1
%EQUATE `DISPID_SOTIsUISupported = %DISPID_SOTRemoveStorageFileName + 1
%EQUATE `DISPID_SOTDisplayUI = %DISPID_SOTIsUISupported + 1
%EQUATE `DISPID_SOTMatchesAttributes = %DISPID_SOTDisplayUI + 1
' enum SpeechDataKeyLocation
%EQUATE `SDKLDefaultLocation = %SPDKL_DefaultLocation
%EQUATE `SDKLCurrentUser = %SPDKL_CurrentUser
%EQUATE `SDKLLocalMachine = %SPDKL_LocalMachine
%EQUATE `SDKLCurrentConfig = %SPDKL_CurrentConfig
' enum SpeechTokenContext
%EQUATE `STCInprocServer = %CLSCTX_INPROC_SERVER
%EQUATE `STCInprocHandler = %CLSCTX_INPROC_HANDLER
%EQUATE `STCLocalServer = %CLSCTX_LOCAL_SERVER
%EQUATE `STCRemoteServer = %CLSCTX_REMOTE_SERVER
%EQUATE `STCAll = %CLSCTX_INPROC_SERVER OR %CLSCTX_INPROC_HANDLER OR %CLSCTX_LOCAL_SERVER OR %CLSCTX_REMOTE_SERVER
' enum SpeechTokenShellFolder
%EQUATE `STSF_AppData = &H1a
%EQUATE `STSF_LocalAppData = &H1c
%EQUATE `STSF_CommonAppData = &H23
%EQUATE `STSF_FlagCreate = &H8000
' enum DISPID_SpeechObjectTokens
%EQUATE `DISPID_SOTsCount = 1
%EQUATE `DISPID_SOTsItem = %DISPID_VALUE
%EQUATE `DISPID_SOTs_NewEnum = %DISPID_NEWENUM
' enum DISPID_SpeechObjectTokenCategory
%EQUATE `DISPID_SOTCId = 1
%EQUATE `DISPID_SOTCDefault = %DISPID_SOTCId + 1
%EQUATE `DISPID_SOTCSetId = %DISPID_SOTCDefault + 1
%EQUATE `DISPID_SOTCGetDataKey = %DISPID_SOTCSetId + 1
%EQUATE `DISPID_SOTCEnumerateTokens = %DISPID_SOTCGetDataKey + 1
' enum SpeechAudioFormatType
%EQUATE `SAFTDefault = -1
%EQUATE `SAFTNoAssignedFormat = 0
%EQUATE `SAFTText = %SAFTNoAssignedFormat + 1
%EQUATE `SAFTNonStandardFormat = %SAFTText + 1
%EQUATE `SAFTExtendedAudioFormat = %SAFTNonStandardFormat + 1
%EQUATE `SAFT8kHz8BitMono = %SAFTExtendedAudioFormat + 1
%EQUATE `SAFT8kHz8BitStereo = %SAFT8kHz8BitMono + 1
%EQUATE `SAFT8kHz16BitMono = %SAFT8kHz8BitStereo + 1
%EQUATE `SAFT8kHz16BitStereo = %SAFT8kHz16BitMono + 1
%EQUATE `SAFT11kHz8BitMono = %SAFT8kHz16BitStereo + 1
%EQUATE `SAFT11kHz8BitStereo = %SAFT11kHz8BitMono + 1
%EQUATE `SAFT11kHz16BitMono = %SAFT11kHz8BitStereo + 1
%EQUATE `SAFT11kHz16BitStereo = %SAFT11kHz16BitMono + 1
%EQUATE `SAFT12kHz8BitMono = %SAFT11kHz16BitStereo + 1
%EQUATE `SAFT12kHz8BitStereo = %SAFT12kHz8BitMono + 1
%EQUATE `SAFT12kHz16BitMono = %SAFT12kHz8BitStereo + 1
%EQUATE `SAFT12kHz16BitStereo = %SAFT12kHz16BitMono + 1
%EQUATE `SAFT16kHz8BitMono = %SAFT12kHz16BitStereo + 1
%EQUATE `SAFT16kHz8BitStereo = %SAFT16kHz8BitMono + 1
%EQUATE `SAFT16kHz16BitMono = %SAFT16kHz8BitStereo + 1
%EQUATE `SAFT16kHz16BitStereo = %SAFT16kHz16BitMono + 1
%EQUATE `SAFT22kHz8BitMono = %SAFT16kHz16BitStereo + 1
%EQUATE `SAFT22kHz8BitStereo = %SAFT22kHz8BitMono + 1
%EQUATE `SAFT22kHz16BitMono = %SAFT22kHz8BitStereo + 1
%EQUATE `SAFT22kHz16BitStereo = %SAFT22kHz16BitMono + 1
%EQUATE `SAFT24kHz8BitMono = %SAFT22kHz16BitStereo + 1
%EQUATE `SAFT24kHz8BitStereo = %SAFT24kHz8BitMono + 1
%EQUATE `SAFT24kHz16BitMono = %SAFT24kHz8BitStereo + 1
%EQUATE `SAFT24kHz16BitStereo = %SAFT24kHz16BitMono + 1
%EQUATE `SAFT32kHz8BitMono = %SAFT24kHz16BitStereo + 1
%EQUATE `SAFT32kHz8BitStereo = %SAFT32kHz8BitMono + 1
%EQUATE `SAFT32kHz16BitMono = %SAFT32kHz8BitStereo + 1
%EQUATE `SAFT32kHz16BitStereo = %SAFT32kHz16BitMono + 1
%EQUATE `SAFT44kHz8BitMono = %SAFT32kHz16BitStereo + 1
%EQUATE `SAFT44kHz8BitStereo = %SAFT44kHz8BitMono + 1
%EQUATE `SAFT44kHz16BitMono = %SAFT44kHz8BitStereo + 1
%EQUATE `SAFT44kHz16BitStereo = %SAFT44kHz16BitMono + 1
%EQUATE `SAFT48kHz8BitMono = %SAFT44kHz16BitStereo + 1
%EQUATE `SAFT48kHz8BitStereo = %SAFT48kHz8BitMono + 1
%EQUATE `SAFT48kHz16BitMono = %SAFT48kHz8BitStereo + 1
%EQUATE `SAFT48kHz16BitStereo = %SAFT48kHz16BitMono + 1
%EQUATE `SAFTTrueSpeech_8kHz1BitMono = %SAFT48kHz16BitStereo + 1
%EQUATE `SAFTCCITT_ALaw_8kHzMono = %SAFTTrueSpeech_8kHz1BitMono + 1
%EQUATE `SAFTCCITT_ALaw_8kHzStereo = %SAFTCCITT_ALaw_8kHzMono + 1
%EQUATE `SAFTCCITT_ALaw_11kHzMono = %SAFTCCITT_ALaw_8kHzStereo + 1
%EQUATE `SAFTCCITT_ALaw_11kHzStereo = %SAFTCCITT_ALaw_11kHzMono + 1
%EQUATE `SAFTCCITT_ALaw_22kHzMono = %SAFTCCITT_ALaw_11kHzStereo + 1
%EQUATE `SAFTCCITT_ALaw_22kHzStereo = %SAFTCCITT_ALaw_22kHzMono + 1
%EQUATE `SAFTCCITT_ALaw_44kHzMono = %SAFTCCITT_ALaw_22kHzStereo + 1
%EQUATE `SAFTCCITT_ALaw_44kHzStereo = %SAFTCCITT_ALaw_44kHzMono + 1
%EQUATE `SAFTCCITT_uLaw_8kHzMono = %SAFTCCITT_ALaw_44kHzStereo + 1
%EQUATE `SAFTCCITT_uLaw_8kHzStereo = %SAFTCCITT_uLaw_8kHzMono + 1
%EQUATE `SAFTCCITT_uLaw_11kHzMono = %SAFTCCITT_uLaw_8kHzStereo + 1
%EQUATE `SAFTCCITT_uLaw_11kHzStereo = %SAFTCCITT_uLaw_11kHzMono + 1
%EQUATE `SAFTCCITT_uLaw_22kHzMono = %SAFTCCITT_uLaw_11kHzStereo + 1
%EQUATE `SAFTCCITT_uLaw_22kHzStereo = %SAFTCCITT_uLaw_22kHzMono + 1
%EQUATE `SAFTCCITT_uLaw_44kHzMono = %SAFTCCITT_uLaw_22kHzStereo + 1
%EQUATE `SAFTCCITT_uLaw_44kHzStereo = %SAFTCCITT_uLaw_44kHzMono + 1
%EQUATE `SAFTADPCM_8kHzMono = %SAFTCCITT_uLaw_44kHzStereo + 1
%EQUATE `SAFTADPCM_8kHzStereo = %SAFTADPCM_8kHzMono + 1
%EQUATE `SAFTADPCM_11kHzMono = %SAFTADPCM_8kHzStereo + 1
%EQUATE `SAFTADPCM_11kHzStereo = %SAFTADPCM_11kHzMono + 1
%EQUATE `SAFTADPCM_22kHzMono = %SAFTADPCM_11kHzStereo + 1
%EQUATE `SAFTADPCM_22kHzStereo = %SAFTADPCM_22kHzMono + 1
%EQUATE `SAFTADPCM_44kHzMono = %SAFTADPCM_22kHzStereo + 1
%EQUATE `SAFTADPCM_44kHzStereo = %SAFTADPCM_44kHzMono + 1
%EQUATE `SAFTGSM610_8kHzMono = %SAFTADPCM_44kHzStereo + 1
%EQUATE `SAFTGSM610_11kHzMono = %SAFTGSM610_8kHzMono + 1
%EQUATE `SAFTGSM610_22kHzMono = %SAFTGSM610_11kHzMono + 1
%EQUATE `SAFTGSM610_44kHzMono = %SAFTGSM610_22kHzMono + 1
' enum DISPID_SpeechAudioFormat
%EQUATE `DISPID_SAFType = 1
%EQUATE `DISPID_SAFGuid = %DISPID_SAFType + 1
%EQUATE `DISPID_SAFGetWaveFormatEx = %DISPID_SAFGuid + 1
%EQUATE `DISPID_SAFSetWaveFormatEx = %DISPID_SAFGetWaveFormatEx + 1
' enum DISPID_SpeechBaseStream
%EQUATE `DISPID_SBSFormat = 1
%EQUATE `DISPID_SBSRead = %DISPID_SBSFormat + 1
%EQUATE `DISPID_SBSWrite = %DISPID_SBSRead + 1
%EQUATE `DISPID_SBSSeek = %DISPID_SBSWrite + 1
' enum SpeechStreamSeekPositionType
%EQUATE `SSSPTRelativeToStart = %STREAM_SEEK_SET
%EQUATE `SSSPTRelativeToCurrentPosition = %STREAM_SEEK_CUR
%EQUATE `SSSPTRelativeToEnd = %STREAM_SEEK_END
' enum DISPID_SpeechAudio
%EQUATE `DISPID_SAStatus = 200
%EQUATE `DISPID_SABufferInfo = %DISPID_SAStatus + 1
%EQUATE `DISPID_SADefaultFormat = %DISPID_SABufferInfo + 1
%EQUATE `DISPID_SAVolume = %DISPID_SADefaultFormat + 1
%EQUATE `DISPID_SABufferNotifySize = %DISPID_SAVolume + 1
%EQUATE `DISPID_SAEventHandle = %DISPID_SABufferNotifySize + 1
%EQUATE `DISPID_SASetState = %DISPID_SAEventHandle + 1
' enum SpeechAudioState
%EQUATE `SASClosed = %SPAS_CLOSED
%EQUATE `SASStop = %SPAS_STOP
%EQUATE `SASPause = %SPAS_PAUSE
%EQUATE `SASRun = %SPAS_RUN
' enum DISPID_SpeechMMSysAudio
%EQUATE `DISPID_SMSADeviceId = 300
%EQUATE `DISPID_SMSALineId = %DISPID_SMSADeviceId + 1
%EQUATE `DISPID_SMSAMMHandle = %DISPID_SMSALineId + 1
' enum DISPID_SpeechFileStream
%EQUATE `DISPID_SFSOpen = 100
%EQUATE `DISPID_SFSClose = %DISPID_SFSOpen + 1
' enum SpeechStreamFileMode
%EQUATE `SSFMOpenForRead = %SPFM_OPEN_READONLY
%EQUATE `SSFMOpenReadWrite = %SPFM_OPEN_READWRITE
%EQUATE `SSFMCreate = %SPFM_CREATE
%EQUATE `SSFMCreateForWrite = %SPFM_CREATE_ALWAYS
' enum DISPID_SpeechCustomStream
%EQUATE `DISPID_SCSBaseStream = 100
' enum DISPID_SpeechMemoryStream
%EQUATE `DISPID_SMSSetData = 100
%EQUATE `DISPID_SMSGetData = %DISPID_SMSSetData + 1
' enum DISPID_SpeechAudioStatus
%EQUATE `DISPID_SASFreeBufferSpace = 1
%EQUATE `DISPID_SASNonBlockingIO = %DISPID_SASFreeBufferSpace + 1
%EQUATE `DISPID_SASState = %DISPID_SASNonBlockingIO + 1
%EQUATE `DISPID_SASCurrentSeekPosition = %DISPID_SASState + 1
%EQUATE `DISPID_SASCurrentDevicePosition = %DISPID_SASCurrentSeekPosition + 1
' enum DISPID_SpeechAudioBufferInfo
%EQUATE `DISPID_SABIMinNotification = 1
%EQUATE `DISPID_SABIBufferSize = %DISPID_SABIMinNotification + 1
%EQUATE `DISPID_SABIEventBias = %DISPID_SABIBufferSize + 1
' enum DISPID_SpeechWaveFormatEx
%EQUATE `DISPID_SWFEFormatTag = 1
%EQUATE `DISPID_SWFEChannels = %DISPID_SWFEFormatTag + 1
%EQUATE `DISPID_SWFESamplesPerSec = %DISPID_SWFEChannels + 1
%EQUATE `DISPID_SWFEAvgBytesPerSec = %DISPID_SWFESamplesPerSec + 1
%EQUATE `DISPID_SWFEBlockAlign = %DISPID_SWFEAvgBytesPerSec + 1
%EQUATE `DISPID_SWFEBitsPerSample = %DISPID_SWFEBlockAlign + 1
%EQUATE `DISPID_SWFEExtraData = %DISPID_SWFEBitsPerSample + 1
' enum DISPID_SpeechVoice
%EQUATE `DISPID_SVStatus = 1
%EQUATE `DISPID_SVVoice = %DISPID_SVStatus + 1
%EQUATE `DISPID_SVAudioOutput = %DISPID_SVVoice + 1
%EQUATE `DISPID_SVAudioOutputStream = %DISPID_SVAudioOutput + 1
%EQUATE `DISPID_SVRate = %DISPID_SVAudioOutputStream + 1
%EQUATE `DISPID_SVVolume = %DISPID_SVRate + 1
%EQUATE `DISPID_SVAllowAudioOuputFormatChangesOnNextSet = %DISPID_SVVolume + 1
%EQUATE `DISPID_SVEventInterests = %DISPID_SVAllowAudioOuputFormatChangesOnNextSet + 1
%EQUATE `DISPID_SVPriority = %DISPID_SVEventInterests + 1
%EQUATE `DISPID_SVAlertBoundary = %DISPID_SVPriority + 1
%EQUATE `DISPID_SVSyncronousSpeakTimeout = %DISPID_SVAlertBoundary + 1
%EQUATE `DISPID_SVSpeak = %DISPID_SVSyncronousSpeakTimeout + 1
%EQUATE `DISPID_SVSpeakStream = %DISPID_SVSpeak + 1
%EQUATE `DISPID_SVPause = %DISPID_SVSpeakStream + 1
%EQUATE `DISPID_SVResume = %DISPID_SVPause + 1
%EQUATE `DISPID_SVSkip = %DISPID_SVResume + 1
%EQUATE `DISPID_SVGetVoices = %DISPID_SVSkip + 1
%EQUATE `DISPID_SVGetAudioOutputs = %DISPID_SVGetVoices + 1
%EQUATE `DISPID_SVWaitUntilDone = %DISPID_SVGetAudioOutputs + 1
%EQUATE `DISPID_SVSpeakCompleteEvent = %DISPID_SVWaitUntilDone + 1
%EQUATE `DISPID_SVIsUISupported = %DISPID_SVSpeakCompleteEvent + 1
%EQUATE `DISPID_SVDisplayUI = %DISPID_SVIsUISupported + 1
' enum SpeechVoicePriority
%EQUATE `SVPNormal = %SPVPRI_NORMAL
%EQUATE `SVPAlert = %SPVPRI_ALERT
%EQUATE `SVPOver = %SPVPRI_OVER
' enum SpeechVoiceSpeakFlags
%EQUATE `SVSFDefault = %SPF_DEFAULT
%EQUATE `SVSFlagsAsync = %SPF_ASYNC
%EQUATE `SVSFPurgeBeforeSpeak = %SPF_PURGEBEFORESPEAK
%EQUATE `SVSFIsFilename = %SPF_IS_FILENAME
%EQUATE `SVSFIsXML = %SPF_IS_XML
%EQUATE `SVSFIsNotXML = %SPF_IS_NOT_XML
%EQUATE `SVSFPersistXML = %SPF_PERSIST_XML
%EQUATE `SVSFNLPSpeakPunc = %SPF_NLP_SPEAK_PUNC
%EQUATE `SVSFNLPMask = %SPF_NLP_MASK
%EQUATE `SVSFVoiceMask = %SPF_VOICE_MASK
%EQUATE `SVSFUnusedFlags = %SPF_UNUSED_FLAGS
' enum SpeechVoiceEvents
%EQUATE `SVEStartInputStream = &H2 ' 1L << 1
%EQUATE `SVEEndInputStream = &H4 ' 1L << 2
%EQUATE `SVEVoiceChange = &H8 ' 1L << 3
%EQUATE `SVEBookmark = &H10 ' 1L << 4
%EQUATE `SVEWordBoundary = &H20 ' 1L << 5
%EQUATE `SVEPhoneme = &H40 ' 1L << 6
%EQUATE `SVESentenceBoundary = &H80 ' 1L << 7
%EQUATE `SVEViseme = &H100 ' 1L << 8
%EQUATE `SVEAudioLevel = &H200 ' 1L << 9
%EQUATE `SVEPrivate = &H8000 ' 1L << 15
%EQUATE `SVEAllEvents = &H83FE
' enum DISPID_SpeechVoiceStatus
%EQUATE `DISPID_SVSCurrentStreamNumber = 1
%EQUATE `DISPID_SVSLastStreamNumberQueued = %DISPID_SVSCurrentStreamNumber + 1
%EQUATE `DISPID_SVSLastResult = %DISPID_SVSLastStreamNumberQueued + 1
%EQUATE `DISPID_SVSRunningState = %DISPID_SVSLastResult + 1
%EQUATE `DISPID_SVSInputWordPosition = %DISPID_SVSRunningState + 1
%EQUATE `DISPID_SVSInputWordLength = %DISPID_SVSInputWordPosition + 1
%EQUATE `DISPID_SVSInputSentencePosition = %DISPID_SVSInputWordLength + 1
%EQUATE `DISPID_SVSInputSentenceLength = %DISPID_SVSInputSentencePosition + 1
%EQUATE `DISPID_SVSLastBookmark = %DISPID_SVSInputSentenceLength + 1
%EQUATE `DISPID_SVSLastBookmarkId = %DISPID_SVSLastBookmark + 1
%EQUATE `DISPID_SVSPhonemeId = %DISPID_SVSLastBookmarkId + 1
%EQUATE `DISPID_SVSVisemeId = %DISPID_SVSPhonemeId + 1
' enum SpeechRunState
%EQUATE `SRSEDone = %SPRS_DONE
%EQUATE `SRSEIsSpeaking = %SPRS_IS_SPEAKING
' enum SpeechVisemeType
%EQUATE `SVP_0 = 0
%EQUATE `SVP_1 = %SVP_0 + 1
%EQUATE `SVP_2 = %SVP_1 + 1
%EQUATE `SVP_3 = %SVP_2 + 1
%EQUATE `SVP_4 = %SVP_3 + 1
%EQUATE `SVP_5 = %SVP_4 + 1
%EQUATE `SVP_6 = %SVP_5 + 1
%EQUATE `SVP_7 = %SVP_6 + 1
%EQUATE `SVP_8 = %SVP_7 + 1
%EQUATE `SVP_9 = %SVP_8 + 1
%EQUATE `SVP_10 = %SVP_9 + 1
%EQUATE `SVP_11 = %SVP_10 + 1
%EQUATE `SVP_12 = %SVP_11 + 1
%EQUATE `SVP_13 = %SVP_12 + 1
%EQUATE `SVP_14 = %SVP_13 + 1
%EQUATE `SVP_15 = %SVP_14 + 1
%EQUATE `SVP_16 = %SVP_15 + 1
%EQUATE `SVP_17 = %SVP_16 + 1
%EQUATE `SVP_18 = %SVP_17 + 1
%EQUATE `SVP_19 = %SVP_18 + 1
%EQUATE `SVP_20 = %SVP_19 + 1
%EQUATE `SVP_21 = %SVP_20 + 1
' enum SpeechVisemeFeature
%EQUATE `SVF_None = 0
%EQUATE `SVF_Stressed = %SPVFEATURE_STRESSED
%EQUATE `SVF_Emphasis = %SPVFEATURE_EMPHASIS
' enum DISPID_SpeechVoiceEvent
%EQUATE `DISPID_SVEStreamStart = 1
%EQUATE `DISPID_SVEStreamEnd = %DISPID_SVEStreamStart + 1
%EQUATE `DISPID_SVEVoiceChange = %DISPID_SVEStreamEnd + 1
%EQUATE `DISPID_SVEBookmark = %DISPID_SVEVoiceChange + 1
%EQUATE `DISPID_SVEWord = %DISPID_SVEBookmark + 1
%EQUATE `DISPID_SVEPhoneme = %DISPID_SVEWord + 1
%EQUATE `DISPID_SVESentenceBoundary = %DISPID_SVEPhoneme + 1
%EQUATE `DISPID_SVEViseme = %DISPID_SVESentenceBoundary + 1
%EQUATE `DISPID_SVEAudioLevel = %DISPID_SVEViseme + 1
%EQUATE `DISPID_SVEEnginePrivate = %DISPID_SVEAudioLevel + 1
' enum DISPID_SpeechRecognizer
%EQUATE `DISPID_SRRecognizer = 1
%EQUATE `DISPID_SRAllowAudioInputFormatChangesOnNextSet = %DISPID_SRRecognizer + 1
%EQUATE `DISPID_SRAudioInput = %DISPID_SRAllowAudioInputFormatChangesOnNextSet + 1
%EQUATE `DISPID_SRAudioInputStream = %DISPID_SRAudioInput + 1
%EQUATE `DISPID_SRIsShared = %DISPID_SRAudioInputStream + 1
%EQUATE `DISPID_SRState = %DISPID_SRIsShared + 1
%EQUATE `DISPID_SRStatus = %DISPID_SRState + 1
%EQUATE `DISPID_SRProfile = %DISPID_SRStatus + 1
%EQUATE `DISPID_SREmulateRecognition = %DISPID_SRProfile + 1
%EQUATE `DISPID_SRCreateRecoContext = %DISPID_SREmulateRecognition + 1
%EQUATE `DISPID_SRGetFormat = %DISPID_SRCreateRecoContext + 1
%EQUATE `DISPID_SRSetPropertyNumber = %DISPID_SRGetFormat + 1
%EQUATE `DISPID_SRGetPropertyNumber = %DISPID_SRSetPropertyNumber + 1
%EQUATE `DISPID_SRSetPropertyString = %DISPID_SRGetPropertyNumber + 1
%EQUATE `DISPID_SRGetPropertyString = %DISPID_SRSetPropertyString + 1
%EQUATE `DISPID_SRIsUISupported = %DISPID_SRGetPropertyString + 1
%EQUATE `DISPID_SRDisplayUI = %DISPID_SRIsUISupported + 1
%EQUATE `DISPID_SRGetRecognizers = %DISPID_SRDisplayUI + 1
%EQUATE `DISPID_SVGetAudioInputs = %DISPID_SRGetRecognizers + 1
%EQUATE `DISPID_SVGetProfiles = %DISPID_SVGetAudioInputs + 1
' enum SpeechRecognizerState
%EQUATE `SRSInactive = %SPRST_INACTIVE
%EQUATE `SRSActive = %SPRST_ACTIVE
%EQUATE `SRSActiveAlways = %SPRST_ACTIVE_ALWAYS
%EQUATE `SRSInactiveWithPurge = %SPRST_INACTIVE_WITH_PURGE
' enum SpeechDisplayAttributes
%EQUATE `SDA_No_Trailing_Space = 0
%EQUATE `SDA_One_Trailing_Space = %SPAF_ONE_TRAILING_SPACE
%EQUATE `SDA_Two_Trailing_Spaces = %SPAF_TWO_TRAILING_SPACES
%EQUATE `SDA_Consume_Leading_Spaces = %SPAF_CONSUME_LEADING_SPACES
' enum SpeechFormatType
%EQUATE `SFTInput = %SPWF_INPUT
%EQUATE `SFTSREngine = %SPWF_SRENGINE
' enum SpeechEmulationCompareFlags
%EQUATE `SECFIgnoreCase = &H1
%EQUATE `SECFIgnoreKanaType = &H10000
%EQUATE `SECFIgnoreWidth = &H20000
%EQUATE `SECFNoSpecialChars = &H20000000
%EQUATE `SECFEmulateResult = &H40000000
%EQUATE `SECFDefault = ((%SECFIgnoreCase OR %SECFIgnoreKanaType) OR %SECFIgnoreWidth)
' enum DISPID_SpeechRecognizerStatus
%EQUATE `DISPID_SRSAudioStatus = 1
%EQUATE `DISPID_SRSCurrentStreamPosition = %DISPID_SRSAudioStatus + 1
%EQUATE `DISPID_SRSCurrentStreamNumber = %DISPID_SRSCurrentStreamPosition + 1
%EQUATE `DISPID_SRSNumberOfActiveRules = %DISPID_SRSCurrentStreamNumber + 1
%EQUATE `DISPID_SRSClsidEngine = %DISPID_SRSNumberOfActiveRules + 1
%EQUATE `DISPID_SRSSupportedLanguages = %DISPID_SRSClsidEngine + 1
' enum DISPID_SpeechRecoContext
%EQUATE `DISPID_SRCRecognizer = 1
%EQUATE `DISPID_SRCAudioInInterferenceStatus = %DISPID_SRCRecognizer + 1
%EQUATE `DISPID_SRCRequestedUIType = %DISPID_SRCAudioInInterferenceStatus + 1
%EQUATE `DISPID_SRCVoice = %DISPID_SRCRequestedUIType + 1
%EQUATE `DISPID_SRAllowVoiceFormatMatchingOnNextSet = %DISPID_SRCVoice + 1
%EQUATE `DISPID_SRCVoicePurgeEvent = %DISPID_SRAllowVoiceFormatMatchingOnNextSet + 1
%EQUATE `DISPID_SRCEventInterests = %DISPID_SRCVoicePurgeEvent + 1
%EQUATE `DISPID_SRCCmdMaxAlternates = %DISPID_SRCEventInterests + 1
%EQUATE `DISPID_SRCState = %DISPID_SRCCmdMaxAlternates + 1
%EQUATE `DISPID_SRCRetainedAudio = %DISPID_SRCState + 1
%EQUATE `DISPID_SRCRetainedAudioFormat = %DISPID_SRCRetainedAudio + 1
%EQUATE `DISPID_SRCPause = %DISPID_SRCRetainedAudioFormat + 1
%EQUATE `DISPID_SRCResume = %DISPID_SRCPause + 1
%EQUATE `DISPID_SRCCreateGrammar = %DISPID_SRCResume + 1
%EQUATE `DISPID_SRCCreateResultFromMemory = %DISPID_SRCCreateGrammar + 1
%EQUATE `DISPID_SRCBookmark = %DISPID_SRCCreateResultFromMemory + 1
%EQUATE `DISPID_SRCSetAdaptationData = %DISPID_SRCBookmark + 1
' enum SpeechRetainedAudioOptions
%EQUATE `SRAONone = %SPAO_NONE
%EQUATE `SRAORetainAudio = %SPAO_RETAIN_AUDIO
' enum SpeechBookmarkOptions
%EQUATE `SBONone = %SPBO_NONE
%EQUATE `SBOPause = %SPBO_PAUSE
' enum SpeechInterference
%EQUATE `SINone = %SPINTERFERENCE_NONE
%EQUATE `SINoise = %SPINTERFERENCE_NOISE
%EQUATE `SINoSignal = %SPINTERFERENCE_NOSIGNAL
%EQUATE `SITooLoud = %SPINTERFERENCE_TOOLOUD
%EQUATE `SITooQuiet = %SPINTERFERENCE_TOOQUIET
%EQUATE `SITooFast = %SPINTERFERENCE_TOOFAST
%EQUATE `SITooSlow = %SPINTERFERENCE_TOOSLOW
' enum SpeechRecoEvents
%EQUATE `SREStreamEnd = &H1 ' 1L << 0
%EQUATE `SRESoundStart = &H2 ' 1L << 1
%EQUATE `SRESoundEnd = &H4 ' 1L << 2
%EQUATE `SREPhraseStart = &H8 ' 1L << 3
%EQUATE `SRERecognition = &H10 ' 1L << 4
%EQUATE `SREHypothesis = &H20 ' 1L << 5
%EQUATE `SREBookmark = &H40 ' 1L << 6
%EQUATE `SREPropertyNumChange = &H80 ' 1L << 7
%EQUATE `SREPropertyStringChange = &H100 ' 1L << 8
%EQUATE `SREFalseRecognition = &H200 ' 1L << 9
%EQUATE `SREInterference = &H400 ' 1L << 10
%EQUATE `SRERequestUI = &H800 ' 1L << 11
%EQUATE `SREStateChange = &H1000 ' 1L << 12
%EQUATE `SREAdaptation = &H2000 ' 1L << 13
%EQUATE `SREStreamStart = &H4000 ' 1L << 14
%EQUATE `SRERecoOtherContext = &H8000 ' 1L << 15
%EQUATE `SREAudioLevel = &H10000 ' 1L << 16
%EQUATE `SREPrivate = &H40000 ' 1L << 18
%EQUATE `SREAllEvents = &H5FFFF
' enum SpeechRecoContextState
%EQUATE `SRCS_Disabled = %SPCS_DISABLED
%EQUATE `SRCS_Enabled = %SPCS_ENABLED
' enum DISPIDSPRG
%EQUATE `DISPID_SRGId = 1
%EQUATE `DISPID_SRGRecoContext = %DISPID_SRGId + 1
%EQUATE `DISPID_SRGState = %DISPID_SRGRecoContext + 1
%EQUATE `DISPID_SRGRules = %DISPID_SRGState + 1
%EQUATE `DISPID_SRGReset = %DISPID_SRGRules + 1
%EQUATE `DISPID_SRGCommit = %DISPID_SRGReset + 1
%EQUATE `DISPID_SRGCmdLoadFromFile = %DISPID_SRGCommit + 1
%EQUATE `DISPID_SRGCmdLoadFromObject = %DISPID_SRGCmdLoadFromFile + 1
%EQUATE `DISPID_SRGCmdLoadFromResource = %DISPID_SRGCmdLoadFromObject + 1
%EQUATE `DISPID_SRGCmdLoadFromMemory = %DISPID_SRGCmdLoadFromResource + 1
%EQUATE `DISPID_SRGCmdLoadFromProprietaryGrammar = %DISPID_SRGCmdLoadFromMemory + 1
%EQUATE `DISPID_SRGCmdSetRuleState = %DISPID_SRGCmdLoadFromProprietaryGrammar + 1
%EQUATE `DISPID_SRGCmdSetRuleIdState = %DISPID_SRGCmdSetRuleState + 1
%EQUATE `DISPID_SRGDictationLoad = %DISPID_SRGCmdSetRuleIdState + 1
%EQUATE `DISPID_SRGDictationUnload = %DISPID_SRGDictationLoad + 1
%EQUATE `DISPID_SRGDictationSetState = %DISPID_SRGDictationUnload + 1
%EQUATE `DISPID_SRGSetWordSequenceData = %DISPID_SRGDictationSetState + 1
%EQUATE `DISPID_SRGSetTextSelection = %DISPID_SRGSetWordSequenceData + 1
%EQUATE `DISPID_SRGIsPronounceable = %DISPID_SRGSetTextSelection + 1
' enum SpeechLoadOption
%EQUATE `SLOStatic = %SPLO_STATIC
%EQUATE `SLODynamic = %SPLO_DYNAMIC
' enum SpeechWordPronounceable
%EQUATE `SWPUnknownWordUnpronounceable = %SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE
%EQUATE `SWPUnknownWordPronounceable = %SPWP_UNKNOWN_WORD_PRONOUNCEABLE
%EQUATE `SWPKnownWordPronounceable = %SPWP_KNOWN_WORD_PRONOUNCEABLE
' enum SpeechGrammarState
%EQUATE `SGSEnabled = %SPGS_ENABLED
%EQUATE `SGSDisabled = %SPGS_DISABLED
%EQUATE `SGSExclusive = %SPGS_EXCLUSIVE
' enum SpeechRuleState
%EQUATE `SGDSInactive = %SPRS_INACTIVE
%EQUATE `SGDSActive = %SPRS_ACTIVE
%EQUATE `SGDSActiveWithAutoPause = %SPRS_ACTIVE_WITH_AUTO_PAUSE
%EQUATE `SGDSActiveUserDelimited = %SPRS_ACTIVE_USER_DELIMITED
' enum SpeechRuleAttributes
%EQUATE `SRATopLevel = %SPRAF_TopLevel
%EQUATE `SRADefaultToActive = %SPRAF_Active
%EQUATE `SRAExport = %SPRAF_Export
%EQUATE `SRAImport = %SPRAF_Import
%EQUATE `SRAInterpreter = %SPRAF_Interpreter
%EQUATE `SRADynamic = %SPRAF_Dynamic
%EQUATE `SRARoot = %SPRAF_Root
' enum SpeechGrammarWordType
%EQUATE `SGDisplay = %SPWT_DISPLAY
%EQUATE `SGLexical = %SPWT_LEXICAL
%EQUATE `SGPronounciation = %SPWT_PRONUNCIATION
%EQUATE `SGLexicalNoSpecialChars = %SPWT_LEXICAL_NO_SPECIAL_CHARS
' enum DISPID_SpeechRecoContextEvents
%EQUATE `DISPID_SRCEStartStream = 1
%EQUATE `DISPID_SRCEEndStream = %DISPID_SRCEStartStream + 1
%EQUATE `DISPID_SRCEBookmark = %DISPID_SRCEEndStream + 1
%EQUATE `DISPID_SRCESoundStart = %DISPID_SRCEBookmark + 1
%EQUATE `DISPID_SRCESoundEnd = %DISPID_SRCESoundStart + 1
%EQUATE `DISPID_SRCEPhraseStart = %DISPID_SRCESoundEnd + 1
%EQUATE `DISPID_SRCERecognition = %DISPID_SRCEPhraseStart + 1
%EQUATE `DISPID_SRCEHypothesis = %DISPID_SRCERecognition + 1
%EQUATE `DISPID_SRCEPropertyNumberChange = %DISPID_SRCEHypothesis + 1
%EQUATE `DISPID_SRCEPropertyStringChange = %DISPID_SRCEPropertyNumberChange + 1
%EQUATE `DISPID_SRCEFalseRecognition = %DISPID_SRCEPropertyStringChange + 1
%EQUATE `DISPID_SRCEInterference = %DISPID_SRCEFalseRecognition + 1
%EQUATE `DISPID_SRCERequestUI = %DISPID_SRCEInterference + 1
%EQUATE `DISPID_SRCERecognizerStateChange = %DISPID_SRCERequestUI + 1
%EQUATE `DISPID_SRCEAdaptation = %DISPID_SRCERecognizerStateChange + 1
%EQUATE `DISPID_SRCERecognitionForOtherContext = %DISPID_SRCEAdaptation + 1
%EQUATE `DISPID_SRCEAudioLevel = %DISPID_SRCERecognitionForOtherContext + 1
%EQUATE `DISPID_SRCEEnginePrivate = %DISPID_SRCEAudioLevel + 1
' enum SpeechRecognitionType
%EQUATE `SRTStandard = 0
%EQUATE `SRTAutopause = %SPREF_AutoPause
%EQUATE `SRTEmulated = %SPREF_Emulated
%EQUATE `SRTSMLTimeout = %SPREF_SMLTimeout
%EQUATE `SRTExtendableParse = %SPREF_ExtendableParse
%EQUATE `SRTReSent = %SPREF_ReSent
' enum DISPID_SpeechGrammarRule
%EQUATE `DISPID_SGRAttributes = 1
%EQUATE `DISPID_SGRInitialState = %DISPID_SGRAttributes + 1
%EQUATE `DISPID_SGRName = %DISPID_SGRInitialState + 1
%EQUATE `DISPID_SGRId = %DISPID_SGRName + 1
%EQUATE `DISPID_SGRClear = %DISPID_SGRId + 1
%EQUATE `DISPID_SGRAddResource = %DISPID_SGRClear + 1
%EQUATE `DISPID_SGRAddState = %DISPID_SGRAddResource + 1
' enum DISPID_SpeechGrammarRules
%EQUATE `DISPID_SGRsCount = 1
%EQUATE `DISPID_SGRsDynamic = %DISPID_SGRsCount + 1
%EQUATE `DISPID_SGRsAdd = %DISPID_SGRsDynamic + 1
%EQUATE `DISPID_SGRsCommit = %DISPID_SGRsAdd + 1
%EQUATE `DISPID_SGRsCommitAndSave = %DISPID_SGRsCommit + 1
%EQUATE `DISPID_SGRsFindRule = %DISPID_SGRsCommitAndSave + 1
%EQUATE `DISPID_SGRsItem = %DISPID_VALUE
%EQUATE `DISPID_SGRs_NewEnum = %DISPID_NEWENUM
' enum DISPID_SpeechGrammarRuleState
%EQUATE `DISPID_SGRSRule = 1
%EQUATE `DISPID_SGRSTransitions = %DISPID_SGRSRule + 1
%EQUATE `DISPID_SGRSAddWordTransition = %DISPID_SGRSTransitions + 1
%EQUATE `DISPID_SGRSAddRuleTransition = %DISPID_SGRSAddWordTransition + 1
%EQUATE `DISPID_SGRSAddSpecialTransition = %DISPID_SGRSAddRuleTransition + 1
' enum SpeechSpecialTransitionType
%EQUATE `SSTTWildcard = 1
%EQUATE `SSTTDictation = %SSTTWildcard + 1
%EQUATE `SSTTTextBuffer = %SSTTDictation + 1
' enum DISPID_SpeechGrammarRuleStateTransitions
%EQUATE `DISPID_SGRSTsCount = 1
%EQUATE `DISPID_SGRSTsItem = %DISPID_VALUE
%EQUATE `DISPID_SGRSTs_NewEnum = %DISPID_NEWENUM
' enum DISPID_SpeechGrammarRuleStateTransition
%EQUATE `DISPID_SGRSTType = 1
%EQUATE `DISPID_SGRSTText = %DISPID_SGRSTType + 1
%EQUATE `DISPID_SGRSTRule = %DISPID_SGRSTText + 1
%EQUATE `DISPID_SGRSTWeight = %DISPID_SGRSTRule + 1
%EQUATE `DISPID_SGRSTPropertyName = %DISPID_SGRSTWeight + 1
%EQUATE `DISPID_SGRSTPropertyId = %DISPID_SGRSTPropertyName + 1
%EQUATE `DISPID_SGRSTPropertyValue = %DISPID_SGRSTPropertyId + 1
%EQUATE `DISPID_SGRSTNextState = %DISPID_SGRSTPropertyValue + 1
' enum SpeechGrammarRuleStateTransitionType
%EQUATE `SGRSTTEpsilon = 0
%EQUATE `SGRSTTWord = %SGRSTTEpsilon + 1
%EQUATE `SGRSTTRule = %SGRSTTWord + 1
%EQUATE `SGRSTTDictation = %SGRSTTRule + 1
%EQUATE `SGRSTTWildcard = %SGRSTTDictation + 1
%EQUATE `SGRSTTTextBuffer = %SGRSTTWildcard + 1
' enum DISPIDSPTSI
%EQUATE `DISPIDSPTSI_ActiveOffset = 1
%EQUATE `DISPIDSPTSI_ActiveLength = %DISPIDSPTSI_ActiveOffset + 1
%EQUATE `DISPIDSPTSI_SelectionOffset = %DISPIDSPTSI_ActiveLength + 1
%EQUATE `DISPIDSPTSI_SelectionLength = %DISPIDSPTSI_SelectionOffset + 1
' enum DISPID_SpeechRecoResult
%EQUATE `DISPID_SRRRecoContext = 1
%EQUATE `DISPID_SRRTimes = %DISPID_SRRRecoContext + 1
%EQUATE `DISPID_SRRAudioFormat = %DISPID_SRRTimes + 1
%EQUATE `DISPID_SRRPhraseInfo = %DISPID_SRRAudioFormat + 1
%EQUATE `DISPID_SRRAlternates = %DISPID_SRRPhraseInfo + 1
%EQUATE `DISPID_SRRAudio = %DISPID_SRRAlternates + 1
%EQUATE `DISPID_SRRSpeakAudio = %DISPID_SRRAudio + 1
%EQUATE `DISPID_SRRSaveToMemory = %DISPID_SRRSpeakAudio + 1
%EQUATE `DISPID_SRRDiscardResultInfo = %DISPID_SRRSaveToMemory + 1
' enum SpeechDiscardType
%EQUATE `SDTProperty = %SPDF_PROPERTY
%EQUATE `SDTReplacement = %SPDF_REPLACEMENT
%EQUATE `SDTRule = %SPDF_RULE
%EQUATE `SDTDisplayText = %SPDF_DISPLAYTEXT
%EQUATE `SDTLexicalForm = %SPDF_LEXICALFORM
%EQUATE `SDTPronunciation = %SPDF_PRONUNCIATION
%EQUATE `SDTAudio = %SPDF_AUDIO
%EQUATE `SDTAlternates = %SPDF_ALTERNATES
%EQUATE `SDTAll = %SPDF_ALL
' enum DISPID_SpeechXMLRecoResult
%EQUATE `DISPID_SRRGetXMLResult = %DISPID_SRRDiscardResultInfo + 1
%EQUATE `DISPID_SRRGetXMLErrorInfo = %DISPID_SRRGetXMLResult + 1
' enum DISPID_SpeechRecoResult2
%EQUATE `DISPID_SRRSetTextFeedback = %DISPID_SRRGetXMLErrorInfo + 1
' enum DISPID_SpeechPhraseBuilder
%EQUATE `DISPID_SPPBRestorePhraseFromMemory = 1
' enum DISPID_SpeechRecoResultTimes
%EQUATE `DISPID_SRRTStreamTime = 1
%EQUATE `DISPID_SRRTLength = %DISPID_SRRTStreamTime + 1
%EQUATE `DISPID_SRRTTickCount = %DISPID_SRRTLength + 1
%EQUATE `DISPID_SRRTOffsetFromStart = %DISPID_SRRTTickCount + 1
' enum DISPID_SpeechPhraseAlternate
%EQUATE `DISPID_SPARecoResult = 1
%EQUATE `DISPID_SPAStartElementInResult = %DISPID_SPARecoResult + 1
%EQUATE `DISPID_SPANumberOfElementsInResult = %DISPID_SPAStartElementInResult + 1
%EQUATE `DISPID_SPAPhraseInfo = %DISPID_SPANumberOfElementsInResult + 1
%EQUATE `DISPID_SPACommit = %DISPID_SPAPhraseInfo + 1
' enum DISPID_SpeechPhraseAlternates
%EQUATE `DISPID_SPAsCount = 1
%EQUATE `DISPID_SPAsItem = %DISPID_VALUE
%EQUATE `DISPID_SPAs_NewEnum = %DISPID_NEWENUM
' enum DISPID_SpeechPhraseInfo
%EQUATE `DISPID_SPILanguageId = 1
%EQUATE `DISPID_SPIGrammarId = %DISPID_SPILanguageId + 1
%EQUATE `DISPID_SPIStartTime = %DISPID_SPIGrammarId + 1
%EQUATE `DISPID_SPIAudioStreamPosition = %DISPID_SPIStartTime + 1
%EQUATE `DISPID_SPIAudioSizeBytes = %DISPID_SPIAudioStreamPosition + 1
%EQUATE `DISPID_SPIRetainedSizeBytes = %DISPID_SPIAudioSizeBytes + 1
%EQUATE `DISPID_SPIAudioSizeTime = %DISPID_SPIRetainedSizeBytes + 1
%EQUATE `DISPID_SPIRule = %DISPID_SPIAudioSizeTime + 1
%EQUATE `DISPID_SPIProperties = %DISPID_SPIRule + 1
%EQUATE `DISPID_SPIElements = %DISPID_SPIProperties + 1
%EQUATE `DISPID_SPIReplacements = %DISPID_SPIElements + 1
%EQUATE `DISPID_SPIEngineId = %DISPID_SPIReplacements + 1
%EQUATE `DISPID_SPIEnginePrivateData = %DISPID_SPIEngineId + 1
%EQUATE `DISPID_SPISaveToMemory = %DISPID_SPIEnginePrivateData + 1
%EQUATE `DISPID_SPIGetText = %DISPID_SPISaveToMemory + 1
%EQUATE `DISPID_SPIGetDisplayAttributes = %DISPID_SPIGetText + 1
' enum DISPID_SpeechPhraseElement
%EQUATE `DISPID_SPEAudioTimeOffset = 1
%EQUATE `DISPID_SPEAudioSizeTime = %DISPID_SPEAudioTimeOffset + 1
%EQUATE `DISPID_SPEAudioStreamOffset = %DISPID_SPEAudioSizeTime + 1
%EQUATE `DISPID_SPEAudioSizeBytes = %DISPID_SPEAudioStreamOffset + 1
%EQUATE `DISPID_SPERetainedStreamOffset = %DISPID_SPEAudioSizeBytes + 1
%EQUATE `DISPID_SPERetainedSizeBytes = %DISPID_SPERetainedStreamOffset + 1
%EQUATE `DISPID_SPEDisplayText = %DISPID_SPERetainedSizeBytes + 1
%EQUATE `DISPID_SPELexicalForm = %DISPID_SPEDisplayText + 1
%EQUATE `DISPID_SPEPronunciation = %DISPID_SPELexicalForm + 1
%EQUATE `DISPID_SPEDisplayAttributes = %DISPID_SPEPronunciation + 1
%EQUATE `DISPID_SPERequiredConfidence = %DISPID_SPEDisplayAttributes + 1
%EQUATE `DISPID_SPEActualConfidence = %DISPID_SPERequiredConfidence + 1
%EQUATE `DISPID_SPEEngineConfidence = %DISPID_SPEActualConfidence + 1
' enum SpeechEngineConfidence
%EQUATE `SECLowConfidence = -1
%EQUATE `SECNormalConfidence = 0
%EQUATE `SECHighConfidence = 1
' enum DISPID_SpeechPhraseElements
%EQUATE `DISPID_SPEsCount = 1
%EQUATE `DISPID_SPEsItem = %DISPID_VALUE
%EQUATE `DISPID_SPEs_NewEnum = %DISPID_NEWENUM
' enum DISPID_SpeechPhraseReplacement
%EQUATE `DISPID_SPRDisplayAttributes = 1
%EQUATE `DISPID_SPRText = %DISPID_SPRDisplayAttributes + 1
%EQUATE `DISPID_SPRFirstElement = %DISPID_SPRText + 1
%EQUATE `DISPID_SPRNumberOfElements = %DISPID_SPRFirstElement + 1
' enum DISPID_SpeechPhraseReplacements
%EQUATE `DISPID_SPRsCount = 1
%EQUATE `DISPID_SPRsItem = %DISPID_VALUE
%EQUATE `DISPID_SPRs_NewEnum = %DISPID_NEWENUM
' enum DISPID_SpeechPhraseProperty
%EQUATE `DISPID_SPPName = 1
%EQUATE `DISPID_SPPId = %DISPID_SPPName + 1
%EQUATE `DISPID_SPPValue = %DISPID_SPPId + 1
%EQUATE `DISPID_SPPFirstElement = %DISPID_SPPValue + 1
%EQUATE `DISPID_SPPNumberOfElements = %DISPID_SPPFirstElement + 1
%EQUATE `DISPID_SPPEngineConfidence = %DISPID_SPPNumberOfElements + 1
%EQUATE `DISPID_SPPConfidence = %DISPID_SPPEngineConfidence + 1
%EQUATE `DISPID_SPPParent = %DISPID_SPPConfidence + 1
%EQUATE `DISPID_SPPChildren = %DISPID_SPPParent + 1
' enum DISPID_SpeechPhraseProperties
%EQUATE `DISPID_SPPsCount = 1
%EQUATE `DISPID_SPPsItem = %DISPID_VALUE
%EQUATE `DISPID_SPPs_NewEnum = %DISPID_NEWENUM
' enum DISPID_SpeechPhraseRule
%EQUATE `DISPID_SPRuleName = 1
%EQUATE `DISPID_SPRuleId = %DISPID_SPRuleName + 1
%EQUATE `DISPID_SPRuleFirstElement = %DISPID_SPRuleId + 1
%EQUATE `DISPID_SPRuleNumberOfElements = %DISPID_SPRuleFirstElement + 1
%EQUATE `DISPID_SPRuleParent = %DISPID_SPRuleNumberOfElements + 1
%EQUATE `DISPID_SPRuleChildren = %DISPID_SPRuleParent + 1
%EQUATE `DISPID_SPRuleConfidence = %DISPID_SPRuleChildren + 1
%EQUATE `DISPID_SPRuleEngineConfidence = %DISPID_SPRuleConfidence + 1
' enum DISPID_SpeechPhraseRules
%EQUATE `DISPID_SPRulesCount = 1
%EQUATE `DISPID_SPRulesItem = %DISPID_VALUE
%EQUATE `DISPID_SPRules_NewEnum = %DISPID_NEWENUM
' enum DISPID_SpeechLexicon
%EQUATE `DISPID_SLGenerationId = 1
%EQUATE `DISPID_SLGetWords = %DISPID_SLGenerationId + 1
%EQUATE `DISPID_SLAddPronunciation = %DISPID_SLGetWords + 1
%EQUATE `DISPID_SLAddPronunciationByPhoneIds = %DISPID_SLAddPronunciation + 1
%EQUATE `DISPID_SLRemovePronunciation = %DISPID_SLAddPronunciationByPhoneIds + 1
%EQUATE `DISPID_SLRemovePronunciationByPhoneIds = %DISPID_SLRemovePronunciation + 1
%EQUATE `DISPID_SLGetPronunciations = %DISPID_SLRemovePronunciationByPhoneIds + 1
%EQUATE `DISPID_SLGetGenerationChange = %DISPID_SLGetPronunciations + 1
' enum SpeechLexiconType
%EQUATE `SLTUser = %eLEXTYPE_USER
%EQUATE `SLTApp = %eLEXTYPE_APP
' enum SpeechPartOfSpeech
%EQUATE `SPSNotOverriden = %SPPS_NotOverriden
%EQUATE `SPSUnknown = %SPPS_Unknown
%EQUATE `SPSNoun = %SPPS_Noun
%EQUATE `SPSVerb = %SPPS_Verb
%EQUATE `SPSModifier = %SPPS_Modifier
%EQUATE `SPSFunction = %SPPS_Function
%EQUATE `SPSInterjection = %SPPS_Interjection
%EQUATE `SPSLMA = %SPPS_LMA
%EQUATE `SPSSuppressWord = %SPPS_SuppressWord
' enum DISPID_SpeechLexiconWords
%EQUATE `DISPID_SLWsCount = 1
%EQUATE `DISPID_SLWsItem = %DISPID_VALUE
%EQUATE `DISPID_SLWs_NewEnum = %DISPID_NEWENUM
' enum SpeechWordType
%EQUATE `SWTAdded = %eWORDTYPE_ADDED
%EQUATE `SWTDeleted = %eWORDTYPE_DELETED
' enum DISPID_SpeechLexiconWord
%EQUATE `DISPID_SLWLangId = 1
%EQUATE `DISPID_SLWType = %DISPID_SLWLangId + 1
%EQUATE `DISPID_SLWWord = %DISPID_SLWType + 1
%EQUATE `DISPID_SLWPronunciations = %DISPID_SLWWord + 1
' enum DISPID_SpeechLexiconProns
%EQUATE `DISPID_SLPsCount = 1
%EQUATE `DISPID_SLPsItem = %DISPID_VALUE
%EQUATE `DISPID_SLPs_NewEnum = %DISPID_NEWENUM
' enum DISPID_SpeechLexiconPronunciation
%EQUATE `DISPID_SLPType = 1
%EQUATE `DISPID_SLPLangId = %DISPID_SLPType + 1
%EQUATE `DISPID_SLPPartOfSpeech = %DISPID_SLPLangId + 1
%EQUATE `DISPID_SLPPhoneIds = %DISPID_SLPPartOfSpeech + 1
%EQUATE `DISPID_SLPSymbolic = %DISPID_SLPPhoneIds + 1
' enum DISPID_SpeechPhoneConverter
%EQUATE `DISPID_SPCLangId = 1
%EQUATE `DISPID_SPCPhoneToId = %DISPID_SPCLangId + 1
%EQUATE `DISPID_SPCIdToPhone = %DISPID_SPCPhoneToId + 1
' ########################################################################################
' Interface name = ISpeechDataKey
' IID = {CE17C09B-4EFA-44D5-A4C9-59D9585AB0CD}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechDataKey_INTERFACE_DEFINED)
 %ISpeechDataKey_INTERFACE_DEFINED = 1
INTERFACE ISpeechDataKey $IID_ISpeechDataKey
 INHERIT IDispatch
 ' =====================================================================================
 METHOD SetBinaryValue <1> ( ' VTable offset = 28
 BYVAL ValueName AS WSTRING
 , BYVAL Value AS VARIANT
 ) ' void
 ' =====================================================================================
 METHOD GetBinaryValue <2> ( ' VTable offset = 32
 BYVAL ValueName AS WSTRING
 ) AS VARIANT
 ' =====================================================================================
 METHOD SetStringValue <3> ( ' VTable offset = 36
 BYVAL ValueName AS WSTRING
 , BYVAL Value AS WSTRING
 ) ' void
 ' =====================================================================================
 METHOD GetStringValue <4> ( ' VTable offset = 40
 BYVAL ValueName AS WSTRING
 ) AS WSTRING
 ' =====================================================================================
 METHOD SetLongValue <5> ( ' VTable offset = 44
 BYVAL ValueName AS WSTRING
 , BYVAL Value AS LONG
 ) ' void
 ' =====================================================================================
 METHOD GetLongValue <6> ( ' VTable offset = 48
 BYVAL ValueName AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD OpenKey <7> ( ' VTable offset = 52
 BYVAL SubKeyName AS WSTRING
 ) AS ISpeechDataKey
 ' =====================================================================================
 METHOD CreateKey <8> ( ' VTable offset = 56
 BYVAL SubKeyName AS WSTRING
 ) AS ISpeechDataKey
 ' =====================================================================================
 METHOD DeleteKey <9> ( ' VTable offset = 60
 BYVAL SubKeyName AS WSTRING
 ) ' void
 ' =====================================================================================
 METHOD DeleteValue <10> ( ' VTable offset = 64
 BYVAL ValueName AS WSTRING
 ) ' void
 ' =====================================================================================
 METHOD EnumKeys <11> ( ' VTable offset = 68
 BYVAL Index AS LONG
 ) AS WSTRING
 ' =====================================================================================
 METHOD EnumValues <12> ( ' VTable offset = 72
 BYVAL Index AS LONG
 ) AS WSTRING
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechDataKey_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechObjectToken
' IID = {C74A3ADC-B727-4500-A84A-B526721C8B8C}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechObjectToken_INTERFACE_DEFINED)
 %ISpeechObjectToken_INTERFACE_DEFINED = 1
INTERFACE ISpeechObjectToken $IID_ISpeechObjectToken
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Id <1> ( ' VTable offset = 28
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET DataKey <2> ( ' VTable offset = 32
 ) AS ISpeechDataKey
 ' =====================================================================================
 PROPERTY GET Category <3> ( ' VTable offset = 36
 ) AS ISpeechObjectTokenCategory
 ' =====================================================================================
 METHOD GetDescription <4> ( ' VTable offset = 40
 OPTIONAL BYVAL Locale AS LONG
 ) AS WSTRING
 ' =====================================================================================
 METHOD SetId <5> ( ' VTable offset = 44
 BYVAL Id AS WSTRING
 , OPTIONAL BYVAL CategoryID AS WSTRING
 , OPTIONAL BYVAL CreateIfNotExist AS INTEGER
 ) ' void
 ' =====================================================================================
 METHOD GetAttribute <6> ( ' VTable offset = 48
 BYVAL AttributeName AS WSTRING
 ) AS WSTRING
 ' =====================================================================================
 METHOD CreateInstance <7> ( ' VTable offset = 52
 OPTIONAL BYVAL pUnkOuter AS IUnknown
 , OPTIONAL BYVAL ClsContext AS LONG
 ) AS IUnknown
 ' =====================================================================================
 METHOD Remove <8> ( ' VTable offset = 56
 BYVAL ObjectStorageCLSID AS WSTRING
 ) ' void
 ' =====================================================================================
 METHOD GetStorageFileName <9> ( ' VTable offset = 60
 BYVAL ObjectStorageCLSID AS WSTRING
 , BYVAL KeyName AS WSTRING
 , BYVAL FileName AS WSTRING
 , BYVAL Folder AS LONG
 ) AS WSTRING
 ' =====================================================================================
 METHOD RemoveStorageFileName <10> ( ' VTable offset = 64
 BYVAL ObjectStorageCLSID AS WSTRING
 , BYVAL KeyName AS WSTRING
 , BYVAL DeleteFile AS INTEGER
 ) ' void
 ' =====================================================================================
 METHOD IsUISupported <11> ( ' VTable offset = 68
 BYVAL TypeOfUI AS WSTRING
 , OPTIONAL BYREF ExtraData AS VARIANT
 , OPTIONAL BYVAL Object AS IUnknown
 ) AS INTEGER
 ' =====================================================================================
 METHOD DisplayUI <12> ( ' VTable offset = 72
 BYVAL hWnd AS LONG
 , BYVAL Title AS WSTRING
 , BYVAL TypeOfUI AS WSTRING
 , OPTIONAL BYREF ExtraData AS VARIANT
 , OPTIONAL BYVAL Object AS IUnknown
 ) ' void
 ' =====================================================================================
 METHOD MatchesAttributes <13> ( ' VTable offset = 76
 BYVAL Attributes AS WSTRING
 ) AS INTEGER
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechObjectToken_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechObjectTokens
' IID = {9285B776-2E7B-4BC0-B53E-580EB6FA967F}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechObjectTokens_INTERFACE_DEFINED)
 %ISpeechObjectTokens_INTERFACE_DEFINED = 1
INTERFACE ISpeechObjectTokens $IID_ISpeechObjectTokens
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Item <0> ( ' VTable offset = 32
 BYVAL Index AS LONG
 ) AS ISpeechObjectToken
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 36
 ) AS IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechObjectTokens_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechObjectTokenCategory
' IID = {CA7EAC50-2D01-4145-86D4-5AE7D70F4469}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechObjectTokenCategory_INTERFACE_DEFINED)
 %ISpeechObjectTokenCategory_INTERFACE_DEFINED = 1
INTERFACE ISpeechObjectTokenCategory $IID_ISpeechObjectTokenCategory
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Id <1> ( ' VTable offset = 28
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY SET Default <2> ( ' VTable offset = 32
 BYVAL TokenId AS WSTRING
 ) ' void
 ' =====================================================================================
 PROPERTY GET Default <2> ( ' VTable offset = 36
 ) AS WSTRING
 ' =====================================================================================
 METHOD SetId <3> ( ' VTable offset = 40
 BYVAL Id AS WSTRING
 , OPTIONAL BYVAL CreateIfNotExist AS INTEGER
 ) ' void
 ' =====================================================================================
 METHOD GetDataKey <4> ( ' VTable offset = 44
 OPTIONAL BYVAL Location AS LONG
 ) AS ISpeechDataKey
 ' =====================================================================================
 METHOD EnumerateTokens <5> ( ' VTable offset = 48
 OPTIONAL BYVAL RequiredAttributes AS WSTRING
 , OPTIONAL BYVAL OptionalAttributes AS WSTRING
 ) AS ISpeechObjectTokens
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechObjectTokenCategory_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechAudioBufferInfo
' IID = {11B103D8-1142-4EDF-A093-82FB3915F8CC}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechAudioBufferInfo_INTERFACE_DEFINED)
 %ISpeechAudioBufferInfo_INTERFACE_DEFINED = 1
INTERFACE ISpeechAudioBufferInfo $IID_ISpeechAudioBufferInfo
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET MinNotification <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET MinNotification <1> ( ' VTable offset = 32
 BYVAL MinNotification AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET BufferSize <2> ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET BufferSize <2> ( ' VTable offset = 40
 BYVAL BufferSize AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET EventBias <3> ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET EventBias <3> ( ' VTable offset = 48
 BYVAL EventBias AS LONG
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechAudioBufferInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechAudioStatus
' IID = {C62D9C91-7458-47F6-862D-1EF86FB0B278}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechAudioStatus_INTERFACE_DEFINED)
 %ISpeechAudioStatus_INTERFACE_DEFINED = 1
INTERFACE ISpeechAudioStatus $IID_ISpeechAudioStatus
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET FreeBufferSpace <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET NonBlockingIO <2> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET State <3> ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET CurrentSeekPosition <4> ( ' VTable offset = 40
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET CurrentDevicePosition <5> ( ' VTable offset = 44
 ) AS VARIANT
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechAudioStatus_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechAudioFormat
' IID = {E6E9C590-3E18-40E3-8299-061F98BDE7C7}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechAudioFormat_INTERFACE_DEFINED)
 %ISpeechAudioFormat_INTERFACE_DEFINED = 1
INTERFACE ISpeechAudioFormat $IID_ISpeechAudioFormat
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Type <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET Type <1> ( ' VTable offset = 32
 BYVAL AudioFormat AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET Guid <2> ( ' VTable offset = 36
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY SET Guid <2> ( ' VTable offset = 40
 BYVAL Guid AS WSTRING
 ) ' void
 ' =====================================================================================
 METHOD GetWaveFormatEx <3> ( ' VTable offset = 44
 ) AS ISpeechWaveFormatEx
 ' =====================================================================================
 METHOD SetWaveFormatEx <4> ( ' VTable offset = 48
 BYVAL WaveFormatEx AS ISpeechWaveFormatEx
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechAudioFormat_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechWaveFormatEx
' IID = {7A1EF0D5-1581-4741-88E4-209A49F11A10}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechWaveFormatEx_INTERFACE_DEFINED)
 %ISpeechWaveFormatEx_INTERFACE_DEFINED = 1
INTERFACE ISpeechWaveFormatEx $IID_ISpeechWaveFormatEx
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET FormatTag <1> ( ' VTable offset = 28
 ) AS INTEGER
 ' =====================================================================================
 PROPERTY SET FormatTag <1> ( ' VTable offset = 32
 BYVAL FormatTag AS INTEGER
 ) ' void
 ' =====================================================================================
 PROPERTY GET Channels <2> ( ' VTable offset = 36
 ) AS INTEGER
 ' =====================================================================================
 PROPERTY SET Channels <2> ( ' VTable offset = 40
 BYVAL Channels AS INTEGER
 ) ' void
 ' =====================================================================================
 PROPERTY GET SamplesPerSec <3> ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET SamplesPerSec <3> ( ' VTable offset = 48
 BYVAL SamplesPerSec AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET AvgBytesPerSec <4> ( ' VTable offset = 52
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET AvgBytesPerSec <4> ( ' VTable offset = 56
 BYVAL AvgBytesPerSec AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET BlockAlign <5> ( ' VTable offset = 60
 ) AS INTEGER
 ' =====================================================================================
 PROPERTY SET BlockAlign <5> ( ' VTable offset = 64
 BYVAL BlockAlign AS INTEGER
 ) ' void
 ' =====================================================================================
 PROPERTY GET BitsPerSample <6> ( ' VTable offset = 68
 ) AS INTEGER
 ' =====================================================================================
 PROPERTY SET BitsPerSample <6> ( ' VTable offset = 72
 BYVAL BitsPerSample AS INTEGER
 ) ' void
 ' =====================================================================================
 PROPERTY GET ExtraData <7> ( ' VTable offset = 76
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY SET ExtraData <7> ( ' VTable offset = 80
 BYVAL ExtraData AS VARIANT
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechWaveFormatEx_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechBaseStream
' IID = {6450336F-7D49-4CED-8097-49D6DEE37294}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechBaseStream_INTERFACE_DEFINED)
 %ISpeechBaseStream_INTERFACE_DEFINED = 1
INTERFACE ISpeechBaseStream $IID_ISpeechBaseStream
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Format <1> ( ' VTable offset = 28
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY SET putref_Format <1> ( ' VTable offset = 32
 BYVAL AudioFormat AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 METHOD Read <2> ( ' VTable offset = 36
 BYREF Buffer AS VARIANT
 , BYVAL NumberOfBytes AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Write <3> ( ' VTable offset = 40
 BYVAL Buffer AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD Seek <4> ( ' VTable offset = 44
 BYVAL Position AS VARIANT
 , OPTIONAL BYVAL Origin AS LONG
 ) AS VARIANT
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechBaseStream_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechFileStream
' IID = {AF67F125-AB39-4E93-B4A2-CC2E66E182A7}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = ISpeechBaseStream
' ########################################################################################
#IF NOT %DEF(%ISpeechFileStream_INTERFACE_DEFINED)
 %ISpeechFileStream_INTERFACE_DEFINED = 1
INTERFACE ISpeechFileStream $IID_ISpeechFileStream
 INHERIT IDispatch
 ' =====================================================================================
 ' ISpeechBaseStream Methods
 ' =====================================================================================
 PROPERTY GET Format <1> ( ' VTable offset = 28
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY SET putref_Format <1> ( ' VTable offset = 32
 BYVAL AudioFormat AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 METHOD Read <2> ( ' VTable offset = 36
 BYREF Buffer AS VARIANT
 , BYVAL NumberOfBytes AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Write <3> ( ' VTable offset = 40
 BYVAL Buffer AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD Seek <4> ( ' VTable offset = 44
 BYVAL Position AS VARIANT
 , OPTIONAL BYVAL Origin AS LONG
 ) AS VARIANT
 ' =====================================================================================
 ' =====================================================================================
 ' ISpeechFileStream Methods
 ' =====================================================================================
 METHOD Open <100> ( ' VTable offset = 48
 BYVAL FileName AS WSTRING
 , OPTIONAL BYVAL FileMode AS LONG
 , OPTIONAL BYVAL DoEvents AS INTEGER
 ) ' void
 ' =====================================================================================
 METHOD Close <101> ( ' VTable offset = 52
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechFileStream_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechMemoryStream
' IID = {EEB14B68-808B-4ABE-A5EA-B51DA7588008}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = ISpeechBaseStream
' ########################################################################################
#IF NOT %DEF(%ISpeechMemoryStream_INTERFACE_DEFINED)
 %ISpeechMemoryStream_INTERFACE_DEFINED = 1
INTERFACE ISpeechMemoryStream $IID_ISpeechMemoryStream
 INHERIT IDispatch
 ' =====================================================================================
 ' ISpeechBaseStream Methods
 ' =====================================================================================
 PROPERTY GET Format <1> ( ' VTable offset = 28
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY SET putref_Format <1> ( ' VTable offset = 32
 BYVAL AudioFormat AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 METHOD Read <2> ( ' VTable offset = 36
 BYREF Buffer AS VARIANT
 , BYVAL NumberOfBytes AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Write <3> ( ' VTable offset = 40
 BYVAL Buffer AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD Seek <4> ( ' VTable offset = 44
 BYVAL Position AS VARIANT
 , OPTIONAL BYVAL Origin AS LONG
 ) AS VARIANT
 ' =====================================================================================
 ' =====================================================================================
 ' ISpeechMemoryStream Methods
 ' =====================================================================================
 METHOD SetData <100> ( ' VTable offset = 48
 BYVAL Data AS VARIANT
 ) ' void
 ' =====================================================================================
 METHOD GetData <101> ( ' VTable offset = 52
 ) AS VARIANT
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechMemoryStream_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechCustomStream
' IID = {1A9E9F4F-104F-4DB8-A115-EFD7FD0C97AE}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = ISpeechBaseStream
' ########################################################################################
#IF NOT %DEF(%ISpeechCustomStream_INTERFACE_DEFINED)
 %ISpeechCustomStream_INTERFACE_DEFINED = 1
INTERFACE ISpeechCustomStream $IID_ISpeechCustomStream
 INHERIT IDispatch
 ' =====================================================================================
 ' ISpeechBaseStream Methods
 ' =====================================================================================
 PROPERTY GET Format <1> ( ' VTable offset = 28
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY SET putref_Format <1> ( ' VTable offset = 32
 BYVAL AudioFormat AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 METHOD Read <2> ( ' VTable offset = 36
 BYREF Buffer AS VARIANT
 , BYVAL NumberOfBytes AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Write <3> ( ' VTable offset = 40
 BYVAL Buffer AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD Seek <4> ( ' VTable offset = 44
 BYVAL Position AS VARIANT
 , OPTIONAL BYVAL Origin AS LONG
 ) AS VARIANT
 ' =====================================================================================
 ' =====================================================================================
 ' ISpeechCustomStream Methods
 ' =====================================================================================
 PROPERTY GET BaseStream <100> ( ' VTable offset = 48
 ) AS IUnknown
 ' =====================================================================================
 PROPERTY SET putref_BaseStream <100> ( ' VTable offset = 52
 BYVAL ppUnkStream AS IUnknown
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechCustomStream_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechAudio
' IID = {CFF8E175-019E-11D3-A08E-00C04F8EF9B5}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = ISpeechBaseStream
' ########################################################################################
#IF NOT %DEF(%ISpeechAudio_INTERFACE_DEFINED)
 %ISpeechAudio_INTERFACE_DEFINED = 1
INTERFACE ISpeechAudio $IID_ISpeechAudio
 INHERIT IDispatch
 ' =====================================================================================
 ' ISpeechBaseStream Methods
 ' =====================================================================================
 PROPERTY GET Format <1> ( ' VTable offset = 28
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY SET putref_Format <1> ( ' VTable offset = 32
 BYVAL AudioFormat AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 METHOD Read <2> ( ' VTable offset = 36
 BYREF Buffer AS VARIANT
 , BYVAL NumberOfBytes AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Write <3> ( ' VTable offset = 40
 BYVAL Buffer AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD Seek <4> ( ' VTable offset = 44
 BYVAL Position AS VARIANT
 , OPTIONAL BYVAL Origin AS LONG
 ) AS VARIANT
 ' =====================================================================================
 ' =====================================================================================
 ' ISpeechAudio Methods
 ' =====================================================================================
 PROPERTY GET Status <200> ( ' VTable offset = 48
 ) AS ISpeechAudioStatus
 ' =====================================================================================
 PROPERTY GET BufferInfo <201> ( ' VTable offset = 52
 ) AS ISpeechAudioBufferInfo
 ' =====================================================================================
 PROPERTY GET DefaultFormat <202> ( ' VTable offset = 56
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY GET Volume <203> ( ' VTable offset = 60
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET Volume <203> ( ' VTable offset = 64
 BYVAL Volume AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET BufferNotifySize <204> ( ' VTable offset = 68
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET BufferNotifySize <204> ( ' VTable offset = 72
 BYVAL BufferNotifySize AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET EventHandle <205> ( ' VTable offset = 76
 ) AS LONG
 ' =====================================================================================
 METHOD SetState <206> ( ' VTable offset = 80
 BYVAL State AS LONG
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechAudio_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechMMSysAudio
' IID = {3C76AF6D-1FD7-4831-81D1-3B71D5A13C44}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = ISpeechAudio
' ########################################################################################
#IF NOT %DEF(%ISpeechMMSysAudio_INTERFACE_DEFINED)
 %ISpeechMMSysAudio_INTERFACE_DEFINED = 1
INTERFACE ISpeechMMSysAudio $IID_ISpeechMMSysAudio
 INHERIT IDispatch
 ' =====================================================================================
 ' ISpeechBaseStream Methods
 ' =====================================================================================
 PROPERTY GET Format <1> ( ' VTable offset = 28
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY SET putref_Format <1> ( ' VTable offset = 32
 BYVAL AudioFormat AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 METHOD Read <2> ( ' VTable offset = 36
 BYREF Buffer AS VARIANT
 , BYVAL NumberOfBytes AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Write <3> ( ' VTable offset = 40
 BYVAL Buffer AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD Seek <4> ( ' VTable offset = 44
 BYVAL Position AS VARIANT
 , OPTIONAL BYVAL Origin AS LONG
 ) AS VARIANT
 ' =====================================================================================
 ' =====================================================================================
 ' ISpeechAudio Methods
 ' =====================================================================================
 PROPERTY GET Status <200> ( ' VTable offset = 48
 ) AS ISpeechAudioStatus
 ' =====================================================================================
 PROPERTY GET BufferInfo <201> ( ' VTable offset = 52
 ) AS ISpeechAudioBufferInfo
 ' =====================================================================================
 PROPERTY GET DefaultFormat <202> ( ' VTable offset = 56
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY GET Volume <203> ( ' VTable offset = 60
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET Volume <203> ( ' VTable offset = 64
 BYVAL Volume AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET BufferNotifySize <204> ( ' VTable offset = 68
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET BufferNotifySize <204> ( ' VTable offset = 72
 BYVAL BufferNotifySize AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET EventHandle <205> ( ' VTable offset = 76
 ) AS LONG
 ' =====================================================================================
 METHOD SetState <206> ( ' VTable offset = 80
 BYVAL State AS LONG
 ) ' void
 ' =====================================================================================
 ' =====================================================================================
 ' ISpeechMMSysAudio Methods
 ' =====================================================================================
 PROPERTY GET DeviceId <300> ( ' VTable offset = 84
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET DeviceId <300> ( ' VTable offset = 88
 BYVAL DeviceId AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET LineId <301> ( ' VTable offset = 92
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET LineId <301> ( ' VTable offset = 96
 BYVAL LineId AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET MMHandle <302> ( ' VTable offset = 100
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechMMSysAudio_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechVoice
' IID = {269316D8-57BD-11D2-9EEE-00C04F797396}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechVoice_INTERFACE_DEFINED)
 %ISpeechVoice_INTERFACE_DEFINED = 1
INTERFACE ISpeechVoice $IID_ISpeechVoice
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Status <1> ( ' VTable offset = 28
 ) AS ISpeechVoiceStatus
 ' =====================================================================================
 PROPERTY GET Voice <2> ( ' VTable offset = 32
 ) AS ISpeechObjectToken
 ' =====================================================================================
 PROPERTY SET putref_Voice <2> ( ' VTable offset = 36
 BYVAL Voice AS ISpeechObjectToken
 ) ' void
 ' =====================================================================================
 PROPERTY GET AudioOutput <3> ( ' VTable offset = 40
 ) AS ISpeechObjectToken
 ' =====================================================================================
 PROPERTY SET putref_AudioOutput <3> ( ' VTable offset = 44
 BYVAL AudioOutput AS ISpeechObjectToken
 ) ' void
 ' =====================================================================================
 PROPERTY GET AudioOutputStream <4> ( ' VTable offset = 48
 ) AS ISpeechBaseStream
 ' =====================================================================================
 PROPERTY SET putref_AudioOutputStream <4> ( ' VTable offset = 52
 BYVAL AudioOutputStream AS ISpeechBaseStream
 ) ' void
 ' =====================================================================================
 PROPERTY GET Rate <5> ( ' VTable offset = 56
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET Rate <5> ( ' VTable offset = 60
 BYVAL Rate AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET Volume <6> ( ' VTable offset = 64
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET Volume <6> ( ' VTable offset = 68
 BYVAL Volume AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY SET AllowAudioOutputFormatChangesOnNextSet <7> ( ' VTable offset = 72
 BYVAL Allow AS INTEGER
 ) ' void
 ' =====================================================================================
 PROPERTY GET AllowAudioOutputFormatChangesOnNextSet <7> ( ' VTable offset = 76
 ) AS INTEGER
 ' =====================================================================================
 PROPERTY GET EventInterests <8> ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET EventInterests <8> ( ' VTable offset = 84
 BYVAL EventInterestFlags AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY SET Priority <9> ( ' VTable offset = 88
 BYVAL Priority AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET Priority <9> ( ' VTable offset = 92
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET AlertBoundary <10> ( ' VTable offset = 96
 BYVAL Boundary AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET AlertBoundary <10> ( ' VTable offset = 100
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET SynchronousSpeakTimeout <11> ( ' VTable offset = 104
 BYVAL msTimeout AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET SynchronousSpeakTimeout <11> ( ' VTable offset = 108
 ) AS LONG
 ' =====================================================================================
 METHOD Speak <12> ( ' VTable offset = 112
 BYVAL Text AS WSTRING
 , OPTIONAL BYVAL Flags AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SpeakStream <13> ( ' VTable offset = 116
 BYVAL Stream AS ISpeechBaseStream
 , OPTIONAL BYVAL Flags AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Pause <14> ( ' VTable offset = 120
 ) ' void
 ' =====================================================================================
 METHOD Resume <15> ( ' VTable offset = 124
 ) ' void
 ' =====================================================================================
 METHOD Skip <16> ( ' VTable offset = 128
 BYVAL Type AS WSTRING
 , BYVAL NumItems AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetVoices <17> ( ' VTable offset = 132
 OPTIONAL BYVAL RequiredAttributes AS WSTRING
 , OPTIONAL BYVAL OptionalAttributes AS WSTRING
 ) AS ISpeechObjectTokens
 ' =====================================================================================
 METHOD GetAudioOutputs <18> ( ' VTable offset = 136
 OPTIONAL BYVAL RequiredAttributes AS WSTRING
 , OPTIONAL BYVAL OptionalAttributes AS WSTRING
 ) AS ISpeechObjectTokens
 ' =====================================================================================
 METHOD WaitUntilDone <19> ( ' VTable offset = 140
 BYVAL msTimeout AS LONG
 ) AS INTEGER
 ' =====================================================================================
 METHOD SpeakCompleteEvent <20> ( ' VTable offset = 144
 ) AS LONG
 ' =====================================================================================
 METHOD IsUISupported <21> ( ' VTable offset = 148
 BYVAL TypeOfUI AS WSTRING
 , OPTIONAL BYREF ExtraData AS VARIANT
 ) AS INTEGER
 ' =====================================================================================
 METHOD DisplayUI <22> ( ' VTable offset = 152
 BYVAL hWndParent AS LONG
 , BYVAL Title AS WSTRING
 , BYVAL TypeOfUI AS WSTRING
 , OPTIONAL BYREF ExtraData AS VARIANT
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechVoice_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechVoiceStatus
' IID = {8BE47B07-57F6-11D2-9EEE-00C04F797396}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechVoiceStatus_INTERFACE_DEFINED)
 %ISpeechVoiceStatus_INTERFACE_DEFINED = 1
INTERFACE ISpeechVoiceStatus $IID_ISpeechVoiceStatus
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET CurrentStreamNumber <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET LastStreamNumberQueued <2> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET LastHResult <3> ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET RunningState <4> ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET InputWordPosition <5> ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET InputWordLength <6> ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET InputSentencePosition <7> ( ' VTable offset = 52
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET InputSentenceLength <8> ( ' VTable offset = 56
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET LastBookmark <9> ( ' VTable offset = 60
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET LastBookmarkId <10> ( ' VTable offset = 64
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET PhonemeId <11> ( ' VTable offset = 68
 ) AS INTEGER
 ' =====================================================================================
 PROPERTY GET VisemeId <12> ( ' VTable offset = 72
 ) AS INTEGER
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechVoiceStatus_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechRecognizer
' IID = {2D5F1C0C-BD75-4B08-9478-3B11FEA2586C}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechRecognizer_INTERFACE_DEFINED)
 %ISpeechRecognizer_INTERFACE_DEFINED = 1
INTERFACE ISpeechRecognizer $IID_ISpeechRecognizer
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY SET putref_Recognizer <1> ( ' VTable offset = 28
 BYVAL ISpeechObjectToken
 ) ' void
 ' =====================================================================================
 PROPERTY GET Recognizer <1> ( ' VTable offset = 32
 ) AS ISpeechObjectToken
 ' =====================================================================================
 PROPERTY SET AllowAudioInputFormatChangesOnNextSet <2> ( ' VTable offset = 36
 BYVAL Allow AS INTEGER
 ) ' void
 ' =====================================================================================
 PROPERTY GET AllowAudioInputFormatChangesOnNextSet <2> ( ' VTable offset = 40
 ) AS INTEGER
 ' =====================================================================================
 PROPERTY SET putref_AudioInput <3> ( ' VTable offset = 44
 OPTIONAL BYVAL AudioInput AS ISpeechObjectToken
 ) ' void
 ' =====================================================================================
 PROPERTY GET AudioInput <3> ( ' VTable offset = 48
 ) AS ISpeechObjectToken
 ' =====================================================================================
 PROPERTY SET putref_AudioInputStream <4> ( ' VTable offset = 52
 OPTIONAL BYVAL AudioInputStream AS ISpeechBaseStream
 ) ' void
 ' =====================================================================================
 PROPERTY GET AudioInputStream <4> ( ' VTable offset = 56
 ) AS ISpeechBaseStream
 ' =====================================================================================
 PROPERTY GET IsShared <5> ( ' VTable offset = 60
 ) AS INTEGER
 ' =====================================================================================
 PROPERTY SET State <6> ( ' VTable offset = 64
 BYVAL State AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET State <6> ( ' VTable offset = 68
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Status <7> ( ' VTable offset = 72
 ) AS ISpeechRecognizerStatus
 ' =====================================================================================
 PROPERTY SET putref_Profile <8> ( ' VTable offset = 76
 OPTIONAL BYVAL Profile AS ISpeechObjectToken
 ) ' void
 ' =====================================================================================
 PROPERTY GET Profile <8> ( ' VTable offset = 80
 ) AS ISpeechObjectToken
 ' =====================================================================================
 METHOD EmulateRecognition <9> ( ' VTable offset = 84
 BYVAL TextElements AS VARIANT
 , OPTIONAL BYREF ElementDisplayAttributes AS VARIANT
 , OPTIONAL BYVAL LanguageId AS LONG
 ) ' void
 ' =====================================================================================
 METHOD CreateRecoContext <10> ( ' VTable offset = 88
 ) AS ISpeechRecoContext
 ' =====================================================================================
 METHOD GetFormat <11> ( ' VTable offset = 92
 BYVAL Type AS LONG
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 METHOD SetPropertyNumber <12> ( ' VTable offset = 96
 BYVAL Name AS WSTRING
 , BYVAL Value AS LONG
 ) AS INTEGER
 ' =====================================================================================
 METHOD GetPropertyNumber <13> ( ' VTable offset = 100
 BYVAL Name AS WSTRING
 , BYREF Value AS LONG
 ) AS INTEGER
 ' =====================================================================================
 METHOD SetPropertyString <14> ( ' VTable offset = 104
 BYVAL Name AS WSTRING
 , BYVAL Value AS WSTRING
 ) AS INTEGER
 ' =====================================================================================
 METHOD GetPropertyString <15> ( ' VTable offset = 108
 BYVAL Name AS WSTRING
 , BYREF Value AS WSTRING
 ) AS INTEGER
 ' =====================================================================================
 METHOD IsUISupported <16> ( ' VTable offset = 112
 BYVAL TypeOfUI AS WSTRING
 , OPTIONAL BYREF ExtraData AS VARIANT
 ) AS INTEGER
 ' =====================================================================================
 METHOD DisplayUI <17> ( ' VTable offset = 116
 BYVAL hWndParent AS LONG
 , BYVAL Title AS WSTRING
 , BYVAL TypeOfUI AS WSTRING
 , OPTIONAL BYREF ExtraData AS VARIANT
 ) ' void
 ' =====================================================================================
 METHOD GetRecognizers <18> ( ' VTable offset = 120
 OPTIONAL BYVAL RequiredAttributes AS WSTRING
 , OPTIONAL BYVAL OptionalAttributes AS WSTRING
 ) AS ISpeechObjectTokens
 ' =====================================================================================
 METHOD GetAudioInputs <19> ( ' VTable offset = 124
 OPTIONAL BYVAL RequiredAttributes AS WSTRING
 , OPTIONAL BYVAL OptionalAttributes AS WSTRING
 ) AS ISpeechObjectTokens
 ' =====================================================================================
 METHOD GetProfiles <20> ( ' VTable offset = 128
 OPTIONAL BYVAL RequiredAttributes AS WSTRING
 , OPTIONAL BYVAL OptionalAttributes AS WSTRING
 ) AS ISpeechObjectTokens
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechRecognizer_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechRecognizerStatus
' IID = {BFF9E781-53EC-484E-BB8A-0E1B5551E35C}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechRecognizerStatus_INTERFACE_DEFINED)
 %ISpeechRecognizerStatus_INTERFACE_DEFINED = 1
INTERFACE ISpeechRecognizerStatus $IID_ISpeechRecognizerStatus
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET AudioStatus <1> ( ' VTable offset = 28
 ) AS ISpeechAudioStatus
 ' =====================================================================================
 PROPERTY GET CurrentStreamPosition <2> ( ' VTable offset = 32
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET CurrentStreamNumber <3> ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET NumberOfActiveRules <4> ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET ClsidEngine <5> ( ' VTable offset = 44
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET SupportedLanguages <6> ( ' VTable offset = 48
 ) AS VARIANT
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechRecognizerStatus_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechRecoContext
' IID = {580AA49D-7E1E-4809-B8E2-57DA806104B8}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechRecoContext_INTERFACE_DEFINED)
 %ISpeechRecoContext_INTERFACE_DEFINED = 1
INTERFACE ISpeechRecoContext $IID_ISpeechRecoContext
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Recognizer <1> ( ' VTable offset = 28
 ) AS ISpeechRecognizer
 ' =====================================================================================
 PROPERTY GET AudioInputInterferenceStatus <2> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET RequestedUIType <3> ( ' VTable offset = 36
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY SET putref_Voice <4> ( ' VTable offset = 40
 BYVAL Voice AS ISpeechVoice
 ) ' void
 ' =====================================================================================
 PROPERTY GET Voice <4> ( ' VTable offset = 44
 ) AS ISpeechVoice
 ' =====================================================================================
 PROPERTY SET AllowVoiceFormatMatchingOnNextSet <5> ( ' VTable offset = 48
 BYVAL pAllow AS INTEGER
 ) ' void
 ' =====================================================================================
 PROPERTY GET AllowVoiceFormatMatchingOnNextSet <5> ( ' VTable offset = 52
 ) AS INTEGER
 ' =====================================================================================
 PROPERTY SET VoicePurgeEvent <6> ( ' VTable offset = 56
 BYVAL EventInterest AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET VoicePurgeEvent <6> ( ' VTable offset = 60
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET EventInterests <7> ( ' VTable offset = 64
 BYVAL EventInterest AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET EventInterests <7> ( ' VTable offset = 68
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET CmdMaxAlternates <8> ( ' VTable offset = 72
 BYVAL MaxAlternates AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET CmdMaxAlternates <8> ( ' VTable offset = 76
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET State <9> ( ' VTable offset = 80
 BYVAL State AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET State <9> ( ' VTable offset = 84
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET RetainedAudio <10> ( ' VTable offset = 88
 BYVAL Option AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET RetainedAudio <10> ( ' VTable offset = 92
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET putref_RetainedAudioFormat <11> ( ' VTable offset = 96
 BYVAL Format AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 PROPERTY GET RetainedAudioFormat <11> ( ' VTable offset = 100
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 METHOD Pause <12> ( ' VTable offset = 104
 ) ' void
 ' =====================================================================================
 METHOD Resume <13> ( ' VTable offset = 108
 ) ' void
 ' =====================================================================================
 METHOD CreateGrammar <14> ( ' VTable offset = 112
 OPTIONAL BYVAL GrammarId AS VARIANT
 ) AS ISpeechRecoGrammar
 ' =====================================================================================
 METHOD CreateResultFromMemory <15> ( ' VTable offset = 116
 BYREF ResultBlock AS VARIANT
 ) AS ISpeechRecoResult
 ' =====================================================================================
 METHOD Bookmark <16> ( ' VTable offset = 120
 BYVAL Options AS LONG
 , BYVAL StreamPos AS VARIANT
 , BYVAL bookmarkId AS VARIANT
 ) ' void
 ' =====================================================================================
 METHOD SetAdaptationData <17> ( ' VTable offset = 124
 BYVAL AdaptationString AS WSTRING
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechRecoContext_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechRecoGrammar
' IID = {B6D6F79F-2158-4E50-B5BC-9A9CCD852A09}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechRecoGrammar_INTERFACE_DEFINED)
 %ISpeechRecoGrammar_INTERFACE_DEFINED = 1
INTERFACE ISpeechRecoGrammar $IID_ISpeechRecoGrammar
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Id <1> ( ' VTable offset = 28
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET RecoContext <2> ( ' VTable offset = 32
 ) AS ISpeechRecoContext
 ' =====================================================================================
 PROPERTY SET State <3> ( ' VTable offset = 36
 BYVAL State AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET State <3> ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Rules <4> ( ' VTable offset = 44
 ) AS ISpeechGrammarRules
 ' =====================================================================================
 METHOD Reset <5> ( ' VTable offset = 48
 OPTIONAL BYVAL NewLanguage AS LONG
 ) ' void
 ' =====================================================================================
 METHOD CmdLoadFromFile <7> ( ' VTable offset = 52
 BYVAL FileName AS WSTRING
 , OPTIONAL BYVAL LoadOption AS LONG
 ) ' void
 ' =====================================================================================
 METHOD CmdLoadFromObject <8> ( ' VTable offset = 56
 BYVAL ClassId AS WSTRING
 , BYVAL GrammarName AS WSTRING
 , OPTIONAL BYVAL LoadOption AS LONG
 ) ' void
 ' =====================================================================================
 METHOD CmdLoadFromResource <9> ( ' VTable offset = 60
 BYVAL hModule AS LONG
 , BYVAL ResourceName AS VARIANT
 , BYVAL ResourceType AS VARIANT
 , BYVAL LanguageId AS LONG
 , OPTIONAL BYVAL LoadOption AS LONG
 ) ' void
 ' =====================================================================================
 METHOD CmdLoadFromMemory <10> ( ' VTable offset = 64
 BYVAL GrammarData AS VARIANT
 , OPTIONAL BYVAL LoadOption AS LONG
 ) ' void
 ' =====================================================================================
 METHOD CmdLoadFromProprietaryGrammar <11> ( ' VTable offset = 68
 BYVAL ProprietaryGuid AS WSTRING
 , BYVAL ProprietaryString AS WSTRING
 , BYVAL ProprietaryData AS VARIANT
 , OPTIONAL BYVAL LoadOption AS LONG
 ) ' void
 ' =====================================================================================
 METHOD CmdSetRuleState <12> ( ' VTable offset = 72
 BYVAL Name AS WSTRING
 , BYVAL State AS LONG
 ) ' void
 ' =====================================================================================
 METHOD CmdSetRuleIdState <13> ( ' VTable offset = 76
 BYVAL RuleId AS LONG
 , BYVAL State AS LONG
 ) ' void
 ' =====================================================================================
 METHOD DictationLoad <14> ( ' VTable offset = 80
 OPTIONAL BYVAL TopicName AS WSTRING
 , OPTIONAL BYVAL LoadOption AS LONG
 ) ' void
 ' =====================================================================================
 METHOD DictationUnload <15> ( ' VTable offset = 84
 ) ' void
 ' =====================================================================================
 METHOD DictationSetState <16> ( ' VTable offset = 88
 BYVAL State AS LONG
 ) ' void
 ' =====================================================================================
 METHOD SetWordSequenceData <17> ( ' VTable offset = 92
 BYVAL Text AS WSTRING
 , BYVAL TextLength AS LONG
 , BYVAL Info AS ISpeechTextSelectionInformation
 ) ' void
 ' =====================================================================================
 METHOD SetTextSelection <18> ( ' VTable offset = 96
 BYVAL Info AS ISpeechTextSelectionInformation
 ) ' void
 ' =====================================================================================
 METHOD IsPronounceable <19> ( ' VTable offset = 100
 BYVAL Word AS WSTRING
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechRecoGrammar_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechGrammarRule
' IID = {AFE719CF-5DD1-44F2-999C-7A399F1CFCCC}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechGrammarRule_INTERFACE_DEFINED)
 %ISpeechGrammarRule_INTERFACE_DEFINED = 1
INTERFACE ISpeechGrammarRule $IID_ISpeechGrammarRule
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Attributes <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET InitialState <2> ( ' VTable offset = 32
 ) AS ISpeechGrammarRuleState
 ' =====================================================================================
 PROPERTY GET Name <3> ( ' VTable offset = 36
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Id <4> ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 METHOD Clear <5> ( ' VTable offset = 44
 ) ' void
 ' =====================================================================================
 METHOD AddResource <6> ( ' VTable offset = 48
 BYVAL ResourceName AS WSTRING
 , BYVAL ResourceValue AS WSTRING
 ) ' void
 ' =====================================================================================
 METHOD AddState <7> ( ' VTable offset = 52
 ) AS ISpeechGrammarRuleState
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechGrammarRule_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechGrammarRules
' IID = {6FFA3B44-FC2D-40D1-8AFC-32911C7F1AD1}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechGrammarRules_INTERFACE_DEFINED)
 %ISpeechGrammarRules_INTERFACE_DEFINED = 1
INTERFACE ISpeechGrammarRules $IID_ISpeechGrammarRules
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD FindRule <6> ( ' VTable offset = 32
 BYVAL RuleNameOrId AS VARIANT
 ) AS ISpeechGrammarRule
 ' =====================================================================================
 METHOD Item <0> ( ' VTable offset = 36
 BYVAL Index AS LONG
 ) AS ISpeechGrammarRule
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 40
 ) AS IUnknown
 ' =====================================================================================
 PROPERTY GET Dynamic <2> ( ' VTable offset = 44
 ) AS INTEGER
 ' =====================================================================================
 METHOD Add <3> ( ' VTable offset = 48
 BYVAL RuleName AS WSTRING
 , BYVAL Attributes AS LONG
 , OPTIONAL BYVAL RuleId AS LONG
 ) AS ISpeechGrammarRule
 ' =====================================================================================
 METHOD Commit <4> ( ' VTable offset = 52
 ) ' void
 ' =====================================================================================
 METHOD CommitAndSave <5> ( ' VTable offset = 56
 BYREF ErrorText AS WSTRING
 ) AS VARIANT
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechGrammarRules_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechGrammarRuleState
' IID = {D4286F2C-EE67-45AE-B928-28D695362EDA}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechGrammarRuleState_INTERFACE_DEFINED)
 %ISpeechGrammarRuleState_INTERFACE_DEFINED = 1
INTERFACE ISpeechGrammarRuleState $IID_ISpeechGrammarRuleState
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Rule <1> ( ' VTable offset = 28
 ) AS ISpeechGrammarRule
 ' =====================================================================================
 PROPERTY GET Transitions <2> ( ' VTable offset = 32
 ) AS ISpeechGrammarRuleStateTransitions
 ' =====================================================================================
 METHOD AddWordTransition <3> ( ' VTable offset = 36
 BYVAL DestState AS ISpeechGrammarRuleState
 , BYVAL Words AS WSTRING
 , OPTIONAL BYVAL Separators AS WSTRING
 , OPTIONAL BYVAL Type AS LONG
 , OPTIONAL BYVAL PropertyName AS WSTRING
 , OPTIONAL BYVAL PropertyId AS LONG
 , OPTIONAL BYREF PropertyValue AS VARIANT
 , OPTIONAL BYVAL Weight AS SINGLE
 ) ' void
 ' =====================================================================================
 METHOD AddRuleTransition <4> ( ' VTable offset = 40
 BYVAL DestinationState AS ISpeechGrammarRuleState
 , BYVAL Rule AS ISpeechGrammarRule
 , OPTIONAL BYVAL PropertyName AS WSTRING
 , OPTIONAL BYVAL PropertyId AS LONG
 , OPTIONAL BYREF PropertyValue AS VARIANT
 , OPTIONAL BYVAL Weight AS SINGLE
 ) ' void
 ' =====================================================================================
 METHOD AddSpecialTransition <5> ( ' VTable offset = 44
 BYVAL DestinationState AS ISpeechGrammarRuleState
 , BYVAL Type AS LONG
 , OPTIONAL BYVAL PropertyName AS WSTRING
 , OPTIONAL BYVAL PropertyId AS LONG
 , OPTIONAL BYREF PropertyValue AS VARIANT
 , OPTIONAL BYVAL Weight AS SINGLE
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechGrammarRuleState_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechGrammarRuleStateTransition
' IID = {CAFD1DB1-41D1-4A06-9863-E2E81DA17A9A}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechGrammarRuleStateTransition_INTERFACE_DEFINED)
 %ISpeechGrammarRuleStateTransition_INTERFACE_DEFINED = 1
INTERFACE ISpeechGrammarRuleStateTransition $IID_ISpeechGrammarRuleStateTransition
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Type <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Text <2> ( ' VTable offset = 32
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Rule <3> ( ' VTable offset = 36
 ) AS ISpeechGrammarRule
 ' =====================================================================================
 PROPERTY GET Weight <4> ( ' VTable offset = 40
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET PropertyName <5> ( ' VTable offset = 44
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET PropertyId <6> ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET PropertyValue <7> ( ' VTable offset = 52
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET NextState <8> ( ' VTable offset = 56
 ) AS ISpeechGrammarRuleState
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechGrammarRuleStateTransition_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechGrammarRuleStateTransitions
' IID = {EABCE657-75BC-44A2-AA7F-C56476742963}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechGrammarRuleStateTransitions_INTERFACE_DEFINED)
 %ISpeechGrammarRuleStateTransitions_INTERFACE_DEFINED = 1
INTERFACE ISpeechGrammarRuleStateTransitions $IID_ISpeechGrammarRuleStateTransitions
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Item <0> ( ' VTable offset = 32
 BYVAL Index AS LONG
 ) AS ISpeechGrammarRuleStateTransition
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 36
 ) AS IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechGrammarRuleStateTransitions_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechTextSelectionInformation
' IID = {3B9C7E7A-6EEE-4DED-9092-11657279ADBE}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechTextSelectionInformation_INTERFACE_DEFINED)
 %ISpeechTextSelectionInformation_INTERFACE_DEFINED = 1
INTERFACE ISpeechTextSelectionInformation $IID_ISpeechTextSelectionInformation
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY SET ActiveOffset <1> ( ' VTable offset = 28
 BYVAL ActiveOffset AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET ActiveOffset <1> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET ActiveLength <2> ( ' VTable offset = 36
 BYVAL ActiveLength AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET ActiveLength <2> ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET SelectionOffset <3> ( ' VTable offset = 44
 BYVAL SelectionOffset AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET SelectionOffset <3> ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET SelectionLength <4> ( ' VTable offset = 52
 BYVAL SelectionLength AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET SelectionLength <4> ( ' VTable offset = 56
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechTextSelectionInformation_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechRecoResult
' IID = {ED2879CF-CED9-4EE6-A534-DE0191D5468D}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechRecoResult_INTERFACE_DEFINED)
 %ISpeechRecoResult_INTERFACE_DEFINED = 1
INTERFACE ISpeechRecoResult $IID_ISpeechRecoResult
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET RecoContext <1> ( ' VTable offset = 28
 ) AS ISpeechRecoContext
 ' =====================================================================================
 PROPERTY GET Times <2> ( ' VTable offset = 32
 ) AS ISpeechRecoResultTimes
 ' =====================================================================================
 PROPERTY SET putref_AudioFormat <3> ( ' VTable offset = 36
 BYVAL Format AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 PROPERTY GET AudioFormat <3> ( ' VTable offset = 40
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY GET PhraseInfo <4> ( ' VTable offset = 44
 ) AS ISpeechPhraseInfo
 ' =====================================================================================
 METHOD Alternates <5> ( ' VTable offset = 48
 BYVAL RequestCount AS LONG
 , OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 ) AS ISpeechPhraseAlternates
 ' =====================================================================================
 METHOD Audio <6> ( ' VTable offset = 52
 OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 ) AS ISpeechMemoryStream
 ' =====================================================================================
 METHOD SpeakAudio <7> ( ' VTable offset = 56
 OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 , OPTIONAL BYVAL Flags AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SaveToMemory <8> ( ' VTable offset = 60
 ) AS VARIANT
 ' =====================================================================================
 METHOD DiscardResultInfo <9> ( ' VTable offset = 64
 BYVAL ValueTypes AS LONG
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechRecoResult_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechRecoResult2
' IID = 8E0A246D-D3C8-45DE-8657-04290C458C3C
' Inherited interface = ISpeechRecoResult
' ########################################################################################
#IF NOT %DEF(%ISpeechRecoResult2_INTERFACE_DEFINED)
 %ISpeechRecoResult2_INTERFACE_DEFINED = 1
INTERFACE ISpeechRecoResult2 $IID_ISpeechRecoResult2
 INHERIT IDispatch
 ' =====================================================================================
 ' ISpeechRecoResult Methods
 ' =====================================================================================
 PROPERTY GET RecoContext <1> ( ' VTable offset = 28
 ) AS ISpeechRecoContext
 ' =====================================================================================
 PROPERTY GET Times <2> ( ' VTable offset = 32
 ) AS ISpeechRecoResultTimes
 ' =====================================================================================
 PROPERTY SET putref_AudioFormat <3> ( ' VTable offset = 36
 BYVAL Format AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 PROPERTY GET AudioFormat <3> ( ' VTable offset = 40
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY GET PhraseInfo <4> ( ' VTable offset = 44
 ) AS ISpeechPhraseInfo
 ' =====================================================================================
 METHOD Alternates <5> ( ' VTable offset = 48
 BYVAL RequestCount AS LONG
 , OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 ) AS ISpeechPhraseAlternates
 ' =====================================================================================
 METHOD Audio <6> ( ' VTable offset = 52
 OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 ) AS ISpeechMemoryStream
 ' =====================================================================================
 METHOD SpeakAudio <7> ( ' VTable offset = 56
 OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 , OPTIONAL BYVAL Flags AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SaveToMemory <8> ( ' VTable offset = 60
 ) AS VARIANT
 ' =====================================================================================
 METHOD DiscardResultInfo <9> ( ' VTable offset = 64
 BYVAL ValueTypes AS LONG
 ) ' void
 ' =====================================================================================
 ' =====================================================================================
 ' ISpeechRecoResult2 Methods
 ' =====================================================================================
 METHOD SetTextFeedback <12> ( ' VTable offset = 68
 BYVAL Feedback AS WSTRING
 , BYVAL WasSuccessful AS INTEGER
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechRecoResult2_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechRecoResultTimes
' IID = {62B3B8FB-F6E7-41BE-BDCB-056B1C29EFC0}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechRecoResultTimes_INTERFACE_DEFINED)
 %ISpeechRecoResultTimes_INTERFACE_DEFINED = 1
INTERFACE ISpeechRecoResultTimes $IID_ISpeechRecoResultTimes
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET StreamTime <1> ( ' VTable offset = 28
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET Length <2> ( ' VTable offset = 32
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET TickCount <3> ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET OffsetFromStart <4> ( ' VTable offset = 40
 ) AS VARIANT
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechRecoResultTimes_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseAlternate
' IID = {27864A2A-2B9F-4CB8-92D3-0D2722FD1E73}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseAlternate_INTERFACE_DEFINED)
 %ISpeechPhraseAlternate_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseAlternate $IID_ISpeechPhraseAlternate
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET RecoResult <1> ( ' VTable offset = 28
 ) AS ISpeechRecoResult
 ' =====================================================================================
 PROPERTY GET StartElementInResult <2> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET NumberOfElementsInResult <3> ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET PhraseInfo <4> ( ' VTable offset = 40
 ) AS ISpeechPhraseInfo
 ' =====================================================================================
 METHOD Commit <5> ( ' VTable offset = 44
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseAlternate_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseAlternates
' IID = {B238B6D5-F276-4C3D-A6C1-2974801C3CC2}
' ISpeechPhraseAlternates Interface
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseAlternates_INTERFACE_DEFINED)
 %ISpeechPhraseAlternates_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseAlternates $IID_ISpeechPhraseAlternates
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Item <0> ( ' VTable offset = 32
 BYVAL Index AS LONG
 ) AS ISpeechPhraseAlternate
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 36
 ) AS IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseAlternates_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseInfo
' IID = {961559CF-4E67-4662-8BF0-D93F1FCD61B3}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseInfo_INTERFACE_DEFINED)
 %ISpeechPhraseInfo_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseInfo $IID_ISpeechPhraseInfo
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET LanguageId <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET GrammarId <2> ( ' VTable offset = 32
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET StartTime <3> ( ' VTable offset = 36
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET AudioStreamPosition <4> ( ' VTable offset = 40
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET AudioSizeBytes <5> ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET RetainedSizeBytes <6> ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET AudioSizeTime <7> ( ' VTable offset = 52
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Rule <8> ( ' VTable offset = 56
 ) AS ISpeechPhraseRule
 ' =====================================================================================
 PROPERTY GET Properties <9> ( ' VTable offset = 60
 ) AS ISpeechPhraseProperties
 ' =====================================================================================
 PROPERTY GET Elements <10> ( ' VTable offset = 64
 ) AS ISpeechPhraseElements
 ' =====================================================================================
 PROPERTY GET Replacements <11> ( ' VTable offset = 68
 ) AS ISpeechPhraseReplacements
 ' =====================================================================================
 PROPERTY GET EngineId <12> ( ' VTable offset = 72
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET EnginePrivateData <13> ( ' VTable offset = 76
 ) AS VARIANT
 ' =====================================================================================
 METHOD SaveToMemory <14> ( ' VTable offset = 80
 ) AS VARIANT
 ' =====================================================================================
 METHOD GetText <15> ( ' VTable offset = 84
 OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 , OPTIONAL BYVAL UseReplacements AS INTEGER
 ) AS WSTRING
 ' =====================================================================================
 METHOD GetDisplayAttributes <16> ( ' VTable offset = 88
 OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 , OPTIONAL BYVAL DisplayAttributes AS INTEGER
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseElement
' IID = {E6176F96-E373-4801-B223-3B62C068C0B4}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseElement_INTERFACE_DEFINED)
 %ISpeechPhraseElement_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseElement $IID_ISpeechPhraseElement
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET AudioTimeOffset <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET AudioSizeTime <2> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET AudioStreamOffset <3> ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET AudioSizeBytes <4> ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET RetainedStreamOffset <5> ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET RetainedSizeBytes <6> ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET DisplayText <7> ( ' VTable offset = 52
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET LexicalForm <8> ( ' VTable offset = 56
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Pronunciation <9> ( ' VTable offset = 60
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET DisplayAttributes <10> ( ' VTable offset = 64
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET RequiredConfidence <11> ( ' VTable offset = 68
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET ActualConfidence <12> ( ' VTable offset = 72
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET EngineConfidence <13> ( ' VTable offset = 76
 ) AS SINGLE
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseElement_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseElements
' IID = {0626B328-3478-467D-A0B3-D0853B93DDA3}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseElements_INTERFACE_DEFINED)
 %ISpeechPhraseElements_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseElements $IID_ISpeechPhraseElements
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Item <0> ( ' VTable offset = 32
 BYVAL Index AS LONG
 ) AS ISpeechPhraseElement
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 36
 ) AS IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseElements_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseReplacement
' IID = {2890A410-53A7-4FB5-94EC-06D4998E3D02}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseReplacement_INTERFACE_DEFINED)
 %ISpeechPhraseReplacement_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseReplacement $IID_ISpeechPhraseReplacement
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET DisplayAttributes <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Text <2> ( ' VTable offset = 32
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET FirstElement <3> ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET NumberOfElements <4> ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseReplacement_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseReplacements
' IID = {38BC662F-2257-4525-959E-2069D2596C05}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseReplacements_INTERFACE_DEFINED)
 %ISpeechPhraseReplacements_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseReplacements $IID_ISpeechPhraseReplacements
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Item <0> ( ' VTable offset = 32
 BYVAL Index AS LONG
 ) AS ISpeechPhraseReplacement
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 36
 ) AS IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseReplacements_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseProperty
' IID = {CE563D48-961E-4732-A2E1-378A42B430BE}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseProperty_INTERFACE_DEFINED)
 %ISpeechPhraseProperty_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseProperty $IID_ISpeechPhraseProperty
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Name <1> ( ' VTable offset = 28
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Id <2> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Value <3> ( ' VTable offset = 36
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET FirstElement <4> ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET NumberOfElements <5> ( ' VTable offset = 44
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET EngineConfidence <6> ( ' VTable offset = 48
 ) AS SINGLE
 ' =====================================================================================
 PROPERTY GET Confidence <7> ( ' VTable offset = 52
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Parent <8> ( ' VTable offset = 56
 ) AS ISpeechPhraseProperty
 ' =====================================================================================
 PROPERTY GET Children <9> ( ' VTable offset = 60
 ) AS ISpeechPhraseProperties
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseProperty_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseProperties
' IID = {08166B47-102E-4B23-A599-BDB98DBFD1F4}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseProperties_INTERFACE_DEFINED)
 %ISpeechPhraseProperties_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseProperties $IID_ISpeechPhraseProperties
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Item <0> ( ' VTable offset = 32
 BYVAL Index AS LONG
 ) AS ISpeechPhraseProperty
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 36
 ) AS IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseProperties_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseRule
' IID = {A7BFE112-A4A0-48D9-B602-C313843F6964}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseRule_INTERFACE_DEFINED)
 %ISpeechPhraseRule_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseRule $IID_ISpeechPhraseRule
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Name <1> ( ' VTable offset = 28
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Id <2> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET FirstElement <3> ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET NumberOfElements <4> ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Parent <5> ( ' VTable offset = 44
 ) AS ISpeechPhraseRule
 ' =====================================================================================
 PROPERTY GET Children <6> ( ' VTable offset = 48
 ) AS ISpeechPhraseRules
 ' =====================================================================================
 PROPERTY GET Confidence <7> ( ' VTable offset = 52
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET EngineConfidence <8> ( ' VTable offset = 56
 ) AS SINGLE
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseRule_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseRules
' IID = {9047D593-01DD-4B72-81A3-E4A0CA69F407}
' ISpeechPhraseRules Interface
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseRules_INTERFACE_DEFINED)
 %ISpeechPhraseRules_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseRules $IID_ISpeechPhraseRules
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Item <0> ( ' VTable offset = 32
 BYVAL Index AS LONG
 ) AS ISpeechPhraseRule
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 36
 ) AS IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseRules_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechLexicon
' IID = {3DA7627A-C7AE-4B23-8708-638C50362C25}
' ISpeechLexicon Interface
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechLexicon_INTERFACE_DEFINED)
 %ISpeechLexicon_INTERFACE_DEFINED = 1
INTERFACE ISpeechLexicon $IID_ISpeechLexicon
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET GenerationId <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD GetWords <2> ( ' VTable offset = 32
 OPTIONAL BYVAL Flags AS LONG
 , OPTIONAL BYREF GenerationId AS LONG
 ) AS ISpeechLexiconWords
 ' =====================================================================================
 METHOD AddPronunciation <3> ( ' VTable offset = 36
 BYVAL bstrWord AS WSTRING
 , BYVAL LangId AS LONG
 , OPTIONAL BYVAL PartOfSpeech AS LONG
 , OPTIONAL BYVAL bstrPronunciation AS WSTRING
 ) ' void
 ' =====================================================================================
 METHOD AddPronunciationByPhoneIds <4> ( ' VTable offset = 40
 BYVAL bstrWord AS WSTRING
 , BYVAL LangId AS LONG
 , OPTIONAL BYVAL PartOfSpeech AS LONG
 , OPTIONAL BYREF VARIANT
 ) ' void
 ' =====================================================================================
 METHOD RemovePronunciation <5> ( ' VTable offset = 44
 BYVAL bstrWord AS WSTRING
 , BYVAL LangId AS LONG
 , OPTIONAL BYVAL PartOfSpeech AS LONG
 , OPTIONAL BYVAL bstrPronunciation AS WSTRING
 ) ' void
 ' =====================================================================================
 METHOD RemovePronunciationByPhoneIds <6> ( ' VTable offset = 48
 BYVAL bstrWord AS WSTRING
 , BYVAL LangId AS LONG
 , OPTIONAL BYVAL PartOfSpeech AS LONG
 , OPTIONAL BYREF PhoneIds AS VARIANT
 ) ' void
 ' =====================================================================================
 METHOD GetPronunciations <7> ( ' VTable offset = 52
 BYVAL bstrWord AS WSTRING
 , OPTIONAL BYVAL LangId AS LONG
 , OPTIONAL BYVAL TypeFlags AS LONG
 ) AS ISpeechLexiconPronunciations
 ' =====================================================================================
 METHOD GetGenerationChange <8> ( ' VTable offset = 56
 BYREF GenerationId AS LONG
 ) AS ISpeechLexiconWords
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechLexicon_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechLexiconWords
' IID = {8D199862-415E-47D5-AC4F-FAA608B424E6}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechLexiconWords_INTERFACE_DEFINED)
 %ISpeechLexiconWords_INTERFACE_DEFINED = 1
INTERFACE ISpeechLexiconWords $IID_ISpeechLexiconWords
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Item <0> ( ' VTable offset = 32
 BYVAL Index AS LONG
 ) AS ISpeechLexiconWord
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 36
 ) AS IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechLexiconWords_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechLexiconWord
' IID = {4E5B933C-C9BE-48ED-8842-1EE51BB1D4FF}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechLexiconWord_INTERFACE_DEFINED)
 %ISpeechLexiconWord_INTERFACE_DEFINED = 1
INTERFACE ISpeechLexiconWord $IID_ISpeechLexiconWord
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET LangId <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Type <2> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET Word <3> ( ' VTable offset = 36
 ) AS WSTRING
 ' =====================================================================================
 PROPERTY GET Pronunciations <4> ( ' VTable offset = 40
 ) AS ISpeechLexiconPronunciations
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechLexiconWord_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechLexiconPronunciations
' IID = {72829128-5682-4704-A0D4-3E2BB6F2EAD3}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechLexiconPronunciations_INTERFACE_DEFINED)
 %ISpeechLexiconPronunciations_INTERFACE_DEFINED = 1
INTERFACE ISpeechLexiconPronunciations $IID_ISpeechLexiconPronunciations
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Count <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Item <0> ( ' VTable offset = 32
 BYVAL Index AS LONG
 ) AS ISpeechLexiconPronunciation
 ' =====================================================================================
 PROPERTY GET NewEnum_ <-4> ( ' VTable offset = 36
 ) AS IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechLexiconPronunciations_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechLexiconPronunciation
' IID = {95252C5D-9E43-4F4A-9899-48EE73352F9F}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechLexiconPronunciation_INTERFACE_DEFINED)
 %ISpeechLexiconPronunciation_INTERFACE_DEFINED = 1
INTERFACE ISpeechLexiconPronunciation $IID_ISpeechLexiconPronunciation
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET Type <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET LangId <2> ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET PartOfSpeech <3> ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY GET PhoneIds <4> ( ' VTable offset = 40
 ) AS VARIANT
 ' =====================================================================================
 PROPERTY GET Symbolic <5> ( ' VTable offset = 44
 ) AS WSTRING
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechLexiconPronunciation_INTERFACE_DEFINED__ */
' IID: {E58442E4-0C80-402C-9559-867337A39765}
#IF NOT %DEF(%SpeechStringConstants_MODULE_DEFINED)
 %SpeechStringConstants_MODULE_DEFINED = 1
$$SpeechRegistryUserRoot = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech"$$
$$SpeechRegistryLocalMachineRoot = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech"$$
$$SpeechCategoryAudioOut = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioOutput"$$
$$SpeechCategoryAudioIn = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioInput"$$
$$SpeechCategoryVoices = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices"$$
$$SpeechCategoryRecognizers = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Recognizers"$$
$$SpeechCategoryAppLexicons = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AppLexicons"$$
$$SpeechCategoryPhoneConverters = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\PhoneConverters"$$
$$SpeechCategoryRecoProfiles = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech\RecoProfiles"$$
$$SpeechTokenIdUserLexicon = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech\CurrentUserLexicon"$$
$$SpeechTokenValueCLSID = "CLSID"$$
$$SpeechTokenKeyFiles = "Files"$$
$$SpeechTokenKeyUI = "UI"$$
$$SpeechTokenKeyAttributes = "Attributes"$$
$$SpeechVoiceCategoryTTSRate = "DefaultTTSRate"$$
$$SpeechPropertyResourceUsage = "ResourceUsage"$$
$$SpeechPropertyHighConfidenceThreshold = "HighConfidenceThreshold"$$
$$SpeechPropertyNormalConfidenceThreshold = "NormalConfidenceThreshold"$$
$$SpeechPropertyLowConfidenceThreshold = "LowConfidenceThreshold"$$
$$SpeechPropertyResponseSpeed = "ResponseSpeed"$$
$$SpeechPropertyComplexResponseSpeed = "ComplexResponseSpeed"$$
$$SpeechPropertyAdaptationOn = "AdaptationOn"$$
$$SpeechDictationTopicSpelling = "Spelling"$$
$$SpeechGrammarTagWildcard = "..."$$
$$SpeechGrammarTagDictation = "*"$$
$$SpeechGrammarTagUnlimitedDictation = "*+"$$
$$SpeechEngineProperties = "EngineProperties"$$
$$SpeechAddRemoveWord = "AddRemoveWord"$$
$$SpeechUserTraining = "UserTraining"$$
$$SpeechMicTraining = "MicTraining"$$
$$SpeechRecoProfileProperties = "RecoProfileProperties"$$
$$SpeechAudioProperties = "AudioProperties"$$
$$SpeechAudioVolume = "AudioVolume"$$
$$SpeechVoiceSkipTypeSentence = "Sentence"$$
$$SpeechAudioFormatGUIDWave = "{C31ADBAE-527F-4ff5-A230-F62BB61FF70C}"$$
$$SpeechAudioFormatGUIDText = "{7CEEF9F9-3D13-11d2-9EE7-00C04F797396}"$$
#ENDIF ' /* __SpeechStringConstants_MODULE_DEFINED__ */
' IID: {F3E092B2-6BDC-410F-BCB2-4C5ED4424180}
#IF NOT %DEF(%SpeechConstants_MODULE_DEFINED)
 %SpeechConstants_MODULE_DEFINED = 1
%EQUATE `Speech_Default_Weight = %DEFAULT_WEIGHT
%EQUATE `Speech_Max_Word_Length = %SP_MAX_WORD_LENGTH
%EQUATE `Speech_Max_Pron_Length = %SP_MAX_PRON_LENGTH
%EQUATE `Speech_StreamPos_Asap = %SP_STREAMPOS_ASAP
%EQUATE `Speech_StreamPos_RealTime = %SP_STREAMPOS_REALTIME
%EQUATE `SpeechAllElements = %SPPR_ALL_ELEMENTS
#ENDIF ' /* __SpeechConstants_MODULE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechXMLRecoResult
' IID = AAEC54AF-8F85-4924-944D-B79D39D72E19
' Inherited interface = ISpeechRecoResult
' ########################################################################################
#IF NOT %DEF(%ISpeechXMLRecoResult_INTERFACE_DEFINED)
 %ISpeechXMLRecoResult_INTERFACE_DEFINED = 1
INTERFACE ISpeechXMLRecoResult $IID_ISpeechXMLRecoResult
 INHERIT IDispatch
 ' =====================================================================================
 ' ISpeechRecoResult Methods
 ' =====================================================================================
 PROPERTY GET RecoContext <1> ( ' VTable offset = 28
 ) AS ISpeechRecoContext
 ' =====================================================================================
 PROPERTY GET Times <2> ( ' VTable offset = 32
 ) AS ISpeechRecoResultTimes
 ' =====================================================================================
 PROPERTY SET putref_AudioFormat <3> ( ' VTable offset = 36
 BYVAL Format AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 PROPERTY GET AudioFormat <3> ( ' VTable offset = 40
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY GET PhraseInfo <4> ( ' VTable offset = 44
 ) AS ISpeechPhraseInfo
 ' =====================================================================================
 METHOD Alternates <5> ( ' VTable offset = 48
 BYVAL RequestCount AS LONG
 , OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 ) AS ISpeechPhraseAlternates
 ' =====================================================================================
 METHOD Audio <6> ( ' VTable offset = 52
 OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 ) AS ISpeechMemoryStream
 ' =====================================================================================
 METHOD SpeakAudio <7> ( ' VTable offset = 56
 OPTIONAL BYVAL StartElement AS LONG
 , OPTIONAL BYVAL Elements AS LONG
 , OPTIONAL BYVAL Flags AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SaveToMemory <8> ( ' VTable offset = 60
 ) AS VARIANT
 ' =====================================================================================
 METHOD DiscardResultInfo <9> ( ' VTable offset = 64
 BYVAL ValueTypes AS LONG
 ) ' void
 ' =====================================================================================
 ' =====================================================================================
 ' ISpeechXMLRecoResult Methods
 ' =====================================================================================
 METHOD GetXMLResult <10> ( ' VTable offset = 68
 BYVAL Options AS LONG
 ) AS WSTRING
 ' =====================================================================================
 METHOD GetXMLErrorInfo <11> ( ' VTable offset = 72
 BYREF LineNumber AS LONG
 , BYREF ScriptLine AS WSTRING
 , BYREF Source AS WSTRING
 , BYREF Description AS WSTRING
 , BYREF ResultCode AS LONG
 ) AS INTEGER
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechXMLRecoResult_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechRecoResultDispatch
' IID = 6D60EB64-ACED-40A6-BBF3-4E557F71DEE2
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechRecoResultDispatch_INTERFACE_DEFINED)
 %ISpeechRecoResultDispatch_INTERFACE_DEFINED = 1
INTERFACE ISpeechRecoResultDispatch $IID_ISpeechRecoResultDispatch
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET RecoContext <1> ( ' VTable offset = 28
 ) AS ISpeechRecoContext
 ' =====================================================================================
 PROPERTY GET Times <2> ( ' VTable offset = 32
 ) AS ISpeechRecoResultTimes
 ' =====================================================================================
 PROPERTY SET putref_AudioFormat <3> ( ' VTable offset = 36
 BYVAL Format AS ISpeechAudioFormat
 ) ' void
 ' =====================================================================================
 PROPERTY GET AudioFormat <3> ( ' VTable offset = 40
 ) AS ISpeechAudioFormat
 ' =====================================================================================
 PROPERTY GET PhraseInfo <4> ( ' VTable offset = 44
 ) AS ISpeechPhraseInfo
 ' =====================================================================================
 METHOD Alternates <5> ( ' VTable offset = 48
 BYVAL RequestCount AS LONG
 , BYVAL StartElement AS LONG
 , BYVAL Elements AS LONG
 ) AS ISpeechPhraseAlternates
 ' =====================================================================================
 METHOD Audio <6> ( ' VTable offset = 52
 BYVAL StartElement AS LONG
 , BYVAL Elements AS LONG
 ) AS ISpeechMemoryStream
 ' =====================================================================================
 METHOD SpeakAudio <7> ( ' VTable offset = 56
 BYVAL StartElement AS LONG
 , BYVAL Elements AS LONG
 , BYVAL Flags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SaveToMemory <8> ( ' VTable offset = 60
 ) AS VARIANT
 ' =====================================================================================
 METHOD DiscardResultInfo <9> ( ' VTable offset = 64
 BYVAL ValueTypes AS LONG
 ) ' void
 ' =====================================================================================
 METHOD GetXMLResult <10> ( ' VTable offset = 68
 BYVAL Options AS LONG
 ) AS WSTRING
 ' =====================================================================================
 METHOD GetXMLErrorInfo <11> ( ' VTable offset = 72
 BYREF LineNumber AS LONG
 , BYREF ScriptLine AS WSTRING
 , BYREF Source AS WSTRING
 , BYREF Description AS WSTRING
 , BYREF ResultCode AS LONG
 ) AS INTEGER
 ' =====================================================================================
 METHOD SetTextFeedback <12> ( ' VTable offset = 76
 BYVAL Feedback AS WSTRING
 , BYVAL WasSuccessful AS INTEGER
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechRecoResultDispatch_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhraseInfoBuilder
' IID = {3B151836-DF3A-4E0A-846C-D2ADC9334333}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhraseInfoBuilder_INTERFACE_DEFINED)
 %ISpeechPhraseInfoBuilder_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhraseInfoBuilder $IID_ISpeechPhraseInfoBuilder
 INHERIT IDispatch
 ' =====================================================================================
 METHOD RestorePhraseFromMemory <1> ( ' VTable offset = 28
 BYREF PhraseInMemory AS VARIANT
 ) AS ISpeechPhraseInfo
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhraseInfoBuilder_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpeechPhoneConverter
' IID = {C3E4F353-433F-43D6-89A1-6A62A7054C3D}
' Attributes = 4160 [&H1040] [Dual] [Dispatchable]
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%ISpeechPhoneConverter_INTERFACE_DEFINED)
 %ISpeechPhoneConverter_INTERFACE_DEFINED = 1
INTERFACE ISpeechPhoneConverter $IID_ISpeechPhoneConverter
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET LanguageId <1> ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET LanguageId <1> ( ' VTable offset = 32
 BYVAL LanguageId AS LONG
 ) ' void
 ' =====================================================================================
 METHOD PhoneToId <2> ( ' VTable offset = 36
 BYVAL Phonemes AS WSTRING
 ) AS VARIANT
 ' =====================================================================================
 METHOD IdToPhone <3> ( ' VTable offset = 40
 BYVAL IdArray AS VARIANT
 ) AS WSTRING
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpeechPhoneConverter_INTERFACE_DEFINED__ */
#ENDIF ' #IF NOT %DEF(%SpeechLib_LIBRARY_DEFINED)
' ########################################################################################
' Class CISpeechVoiceEvents
' Interface name = _ISpeechVoiceEvents
' IID = {A372ACD1-3BEF-4BBD-8FFB-CB3E2B416AF8}
' Attributes = 4096 [&H1000] [Dispatchable]
' ########################################################################################
'CLASS CISpeechVoiceEvents GUID$("{505F4104-7159-401D-BBE2-3CCBADD34BA8}") AS EVENT
'INTERFACE ISpeechVoiceEventsImpl GUID$("{A372ACD1-3BEF-4BBD-8FFB-CB3E2B416AF8}") AS EVENT
' INHERIT IDispatch
' ' =====================================================================================
' METHOD StartStream <1> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD EndStream <2> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD VoiceChange <3> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL VoiceObjectToken AS ISpeechObjectToken
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD Bookmark <4> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL Bookmark AS WSTRING
' , BYVAL BookmarkId AS LONG
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD Word <5> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL CharacterPosition AS LONG
' , BYVAL Length AS LONG
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD Sentence <7> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL CharacterPosition AS LONG
' , BYVAL Length AS LONG
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD Phoneme <6> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL Duration AS LONG
' , BYVAL NextPhoneId AS INTEGER
' , BYVAL Feature AS LONG
' , BYVAL CurrentPhoneId AS INTEGER
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD Viseme <8> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL Duration AS LONG
' , BYVAL NextVisemeId AS LONG
' , BYVAL Feature AS LONG
' , BYVAL CurrentVisemeId AS LONG
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD AudioLevel <9> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL AudioLevel AS LONG
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD EnginePrivate <10> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS LONG
' , BYVAL EngineData AS VARIANT
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
'END INTERFACE
'END CLASS
' ########################################################################################
' Class CISpeechRecoContextEvents
' Interface name = _ISpeechRecoContextEvents
' IID = {7B8FCB42-0E9D-4F00-A048-7B04D6179D3D}
' Attributes = 4096 [&H1000] [Dispatchable]
' ########################################################################################
'CLASS CISpeechRecoContextEvents GUID$("{E1221561-3429-4A4B-A055-B00BBD98A2FC}") AS EVENT
'INTERFACE ISpeechRecoContextEventsImpl GUID$("{7B8FCB42-0E9D-4F00-A048-7B04D6179D3D}") AS EVENT
' INHERIT IDispatch
' ' =====================================================================================
' METHOD StartStream <1> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD EndStream <2> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL StreamReleased AS INTEGER
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD Bookmark <3> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL BookmarkId AS VARIANT
' , BYVAL Options AS LONG
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD SoundStart <4> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD SoundEnd <5> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD PhraseStart <6> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD Recognition <7> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL RecognitionType AS LONG
' , BYVAL Result AS ISpeechRecoResult
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD Hypothesis <8> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL Result AS ISpeechRecoResult
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD PropertyNumberChange <9> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL PropertyName AS WSTRING
' , BYVAL NewNumberValue AS LONG
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD PropertyStringChange <10> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL PropertyName AS WSTRING
' , BYVAL NewStringValue AS WSTRING
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD FalseRecognition <11> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL Result AS ISpeechRecoResult
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD Interference <12> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL Interference AS LONG
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD RequestUI <13> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL UIType AS WSTRING
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD RecognizerStateChange <14> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL NewState AS LONG
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD Adaptation <15> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD RecognitionForOtherContext <16> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD AudioLevel <17> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL AudioLevel AS LONG
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
' ' =====================================================================================
' METHOD EnginePrivate <18> ( ' BYVAL StreamNumber AS LONG
' , BYVAL StreamPosition AS VARIANT
' , BYVAL EngineData AS VARIANT
' ) ' void
' ' *** Insert your code here ***
' END METHOD
' ' =====================================================================================
'END INTERFACE
'END CLASS
'#elif _SAPI_VER >= 0x053
'#include "sapi53.h"
'#else // _SAPI_VER < 0x053
'#include "sapi51.h"
'#endif // _SAPI_VER >= 0x054
' ########################################################################################
' H E L P E R F U N C T I O N S
' ########################################################################################
' ========================================================================================
' SpGetUserDefaultUILanguage
' ========================================================================================
' Description:
' Returns the default user interface language, using a method
' appropriate to the platform (Windows 9x, Windows NT, or Windows 2000)
' Returns:
' Default UI language
' ========================================================================================
FUNCTION SpGetUserDefaultUILanguage () AS WORD
 LOCAL hr AS LONG
 LOCAL wUILang AS WORD
 LOCAL Osv AS OSVERSIONINFO
#IF %DEF(%UNICODE)
 LOCAL szData AS WSTRINGZ * 32
#ELSE
 LOCAL szData AS ASCIIZ * 32
#ENDIF
 LOCAL dwSize AS DWORD
 LOCAL hKey AS DWORD
 hr = %S_OK
 Osv.dwOSVersionInfoSize = SIZEOF(Osv)
 IF GetVersionEx(Osv) = 0 THEN
 hr = GetLastError()
 ' // Get the UI language by one of three methods, depending on the system
 ELSEIF Osv.dwPlatformId <> %VER_PLATFORM_WIN32_NT THEN
 ' // Case 1: Running on Windows 9x. Get the system UI language from registry:
 dwSize = SIZEOF(szData)
 hr = RegOpenKeyEx(%HKEY_USERS, ".Default\Control Panel\desktop\ResourceLocale", 0, %KEY_READ, hKey)
 IF hr = %ERROR_SUCCESS THEN
 hr = RegQueryValueEx(hKey, "", BYVAL %NULL, BYVAL %NULL, szData, dwSize)
 RegCloseKey hKey
 IF hr = %ERROR_SUCCESS THEN
 ' // Convert string to number
 wUILang = VAL("&H" & szData)
 END IF
 END IF
 ELSEIF Osv.dwMajorVersion >= 5.0 THEN
 ' // Case 2: Running on Windows 2000 or later. Use GetUserDefaultUILanguage to find
 ' // the user's prefered UI language
 wUILang = GetUserDefaultUILanguage()
 ELSE
 ' // Case 3: Running on Windows NT 4.0 or earlier. Get UI language
 ' // from locale of .default user in registry:
 ' // HKEY_USERS\.DEFAULT\Control Panel\International\Locale
 dwSize = SIZEOF(szData)
 hr = RegOpenKeyEx(%HKEY_USERS, ".DEFAULT\Control Panel\International", 0, %KEY_READ, hKey)
 IF hr = %ERROR_SUCCESS THEN
 hr = RegQueryValueEx(hKey, "Locale", BYVAL %NULL, BYVAL %NULL, szData, dwSize)
 RegCloseKey hKey
 IF hr = %ERROR_SUCCESS THEN
 ' // Convert string to number
 wUILang = VAL("&H" & szData)
 IF wUILang = &H0401 OR ' // Arabic
 wUILang = &H040d OR ' // Hebrew
 wUILang = &H041e THEN ' // Thai
 ' // Special case these to the English UI.
 ' // These versions of Windows NT 4.0 were enabled only, i.e., the
 ' // UI was English. However, the registry setting
 ' // HKEY_USERS\.DEFAULT\Control Panel\International\Locale was set
 ' // to the respective locale for application compatibility.
 wUILang = MAKELANGID(%LANG_ENGLISH, %SUBLANG_ENGLISH_US)
 END IF
 END IF
 END IF
 END IF
 ' // In failure case, try our best!
 IF wUILang = 0 THEN wUILang = GetUserDefaultUILanguage()
 FUNCTION = wUILang
END FUNCTION
' ========================================================================================
' ========================================================================================
' SpGetDescription
' Passes back the textual description associated with the specified token.
' ========================================================================================
FUNCTION SpGetDescription ( BYVAL pObjToken AS ISpObjectToken, ' *ISpObjectToken
 BYREF ppszDescription AS DWORD ' **WCHAR
 ) AS LONG
 LOCAL hr AS LONG
 LOCAL wszLangId AS WSTRINGZ * 10
 IF ISFALSE ISOBJECT(pObjToken) THEN FUNCTION = %E_POINTER : EXIT FUNCTION
 IF VARPTR(ppszDescription) = %NULL THEN FUNCTION = %E_INVALIDARG : EXIT FUNCTION
 wszLangId = HEX$(SpGetUserDefaultUILanguage, 4)
 hr = pObjToken.GetStringValue(wszLangId, ppszDescription)
 IF hr = %SPERR_NOT_FOUND THEN
 hr = pObjToken.GetStringValue(BYVAL %NULL, ppszDescription)
 END IF
 FUNCTION = hr
END FUNCTION
' ========================================================================================
' ========================================================================================
' SpGetCategoryFromId
' Auxiliar function used by other functions.
' ========================================================================================
FUNCTION SpGetCategoryFromId ( BYREF pszCategoryId AS WSTRINGZ, ' *const WCHAR
 BYREF ppCategory AS ISpObjectTokenCategory, ' **ISpObjectTokenCategory
 OPTIONAL BYVAL fCreateIfNotExist AS LONG
 ) AS LONG
 LOCAL hr AS LONG
 IF VARPTR(ppCategory) = %NULL THEN FUNCTION = %E_INVALIDARG : EXIT FUNCTION
 ppCategory = NEWCOM CLSID $CLSID_SpObjectTokenCategory
 IF ISNOTHING(ppCategory) THEN FUNCTION = %E_NOINTERFACE : EXIT FUNCTION
 hr = ppCategory.SetId(pszCategoryId, fCreateIfNotExist)
 FUNCTION = hr
END FUNCTION
' ========================================================================================
' ========================================================================================
' SpEnumTokens
' Enumerates the tokens for the specified category.
' ========================================================================================
FUNCTION SpEnumTokens ( BYREF pszCategoryId AS WSTRINGZ, ' *const WCHAR
 BYREF pszReqAttribs AS WSTRINGZ, ' *const WCHAR
 BYREF pszOptAttribs AS WSTRINGZ, ' *const WCHAR
 BYREF ppEnum AS IEnumSpObjectTokens ' **IEnumSpObjectTokens
 ) AS LONG
 LOCAL hr AS LONG
 LOCAL pCategory AS ISpObjectTokenCategory
 IF VARPTR(ppEnum) = %NULL THEN FUNCTION = %E_INVALIDARG : EXIT FUNCTION
 hr = SpGetCategoryFromId(pszCategoryId, pCategory)
 IF SUCCEEDED(hr) THEN
 hr = pCategory.EnumTokens(pszReqAttribs, pszOptAttribs, ppEnum)
 END IF
 FUNCTION = hr
END FUNCTION
' ========================================================================================
' ========================================================================================
' SpSetVoice
' Sets the voice used by the speech engine.
' ========================================================================================
FUNCTION SpSetVoice ( BYVAL pISpVoice AS ISpVoice, ' Reference to the IspVoice interface
 BYVAL bstrVoice AS WSTRING ' ANSI STRING - Voice to set, e.g. "Microsoft Mary"
 ) AS LONG
 LOCAL hr AS LONG
 LOCAL pIEnumSpObjectTokens AS IEnumSpObjectTokens
 LOCAL nCount AS DWORD
 LOCAL i AS DWORD
 LOCAL pISpObjectToken AS ISpObjectToken
 LOCAL celtFetched AS DWORD
 LOCAL pszValue AS WSTRINGZ PTR
 LOCAL bstrDesc AS WSTRING
 IF ISNOTHING(pISpVoice) THEN FUNCTION = %E_POINTER : EXIT FUNCTION
 ' // Get a reference to an enumerator for the voices collection
 ' // using the helper function SpEnumTokens
 hr = SpEnumTokens($$SPCAT_VOICES, BYVAL %NULL, BYVAL %NULL, pIEnumSpObjectTokens)
 ' // Parse the collection
 IF SUCCEEDED(hr) THEN
 pIEnumSpObjectTokens.GetCount(nCount)
 FOR i = 0 TO nCount - 1
 hr = pIEnumSpObjectTokens.Next(1, pISpObjectToken, celtFetched)
 IF FAILED(hr) OR celtFetched = 0 THEN EXIT FOR
 hr = SpGetDescription(pISpObjectToken, pszValue)
 IF hr = %S_OK AND pszValue <> %NULL THEN
 bstrDesc = @pszValue
 CoTaskMemFree BYVAL pszValue
 IF bstrDesc = bstrVoice THEN
 pISpVoice.SetVoice pISpObjectToken
 pISpObjectToken = NOTHING
 EXIT FOR
 END IF
 END IF
 pISpObjectToken = NOTHING
 NEXT
 pIEnumSpObjectTokens = NOTHING
 END IF
 FUNCTION = hr
END FUNCTION
' ========================================================================================
' ========================================================================================
' Initiates the speaking of a text string.
' - wcs = The text to be spoken, or the path to a text file, or the url of a web page, or
' the path to a .wav file, or the path to a .xml file.
' - dwFlags = one or more of the following values values should be combined with a bitwise OR.
' SPF_DEFAULT
' Specifies that the default settings should be used. The defaults are:
' Speak the given text string synchronously
' Not purge pending speak requests
' Parse the text as XML only if the first character is a left-angle-bracket (<)
' Not persist global XML state changes across speak calls
' Not expand punctuation characters into words.
' To override this default, use the other flag values given below.
' SPF_ASYNC
' Specifies that the Speak call should be asynchronous. That is, it will return immediately
' after the speak request is queued.
' SPF_PURGEBEFORESPEAK
' Purges all pending speak requests prior to this speak call.
' SPF_IS_FILENAME
' The string passed to ISpVoice::Speak is a file name, and the file text should be spoken.
' SPF_IS_XML
' The input text will be parsed for XML markup.
' SPF_IS_NOT_XML
' The input text will not be parsed for XML markup.
' SPF_PERSIST_XML
' Global state changes in the XML markup will persist across speak calls.
' SPF_NLP_SPEAK_PUNC
' Punctuation characters should be expanded into words (e.g. "This is a sentence." would
' become "This is a sentence period").
' SPF_PARSE_SAPI
' Force XML parsing As MS SAPI.
' SPF_PARSE_SSML
' Force XML parsing As W3C SSML.
' SPF_PARSE_AUTODETECT
' The TTS XML format is auto-detected. This is the default if none of these TTS XML format
' values are present in the bit-field.
' SPF_NLP_MASK
' This mask is used to remove the SAPI handled flags before ISpTTSEngine::Speak is called.
' The only flag which the TTS engine must handle is SPF_NLP_SPEAK_PUNC.
' SPF_PARSE_MASK
' SPF_PARSE_SAPI|SPF_PARSE_SSML.
' SPF_VOICE_MASK
' This is an existing 5.1 mask, which has every flag bit set. In version 5.3, it has
' been extended to contain SPF_PARSE_MASK.
' SPF_UNUSED_FLAGS
' This mask has every unused bit set.
' Return Value: An object reference to the ISpVoice interface.
' ========================================================================================
FUNCTION SpSpeak (BYVAL wcs AS WSTRING, OPTIONAL BYVAL dwFlags AS DWORD) AS ISpVoice
 LOCAL pISpVoice AS ISpVoice
 LOCAL ulStreamNumber AS DWORD
 ' // Create an instance of the ISpVoice interface
 pISpVoice = NEWCOM CLSID $CLSID_SpVoice
 IF ISNOTHING(pISpVoice) THEN EXIT FUNCTION
 ' // Speak the text
 pISpVoice.Speak(BYVAL STRPTR(wcs), dwFlags, ulStreamNumber)
 FUNCTION = pISpVoice
END FUNCTION
' ========================================================================================
#ENDIF
