' ########################################################################################
' Microsoft Windows
' File: sapiddk.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: SpeechDDKLib
' Version: 5.4, Locale ID = 0
' Documentation string: Microsoft Speech Object DDK Library
' Library GUID: {9903F14C-12CE-4C99-9986-2EE3D7D588A8}
' ########################################################################################
#IF NOT %DEF(PBX_sapiddk_PBI)
#DEFINE PBX_sapiddk_PBI
%EQUATE `SAPIDDK_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
#INCLUDE ONCE "Legacy/System/sapi.inc"
'#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
'// The following definitions are for SAPI 5.3 and newer
'#if _SAPI_VER >= 0x053
$$SPRECOEXTENSION = "RecoExtension"$$
$$SPALTERNATESCLSID = "AlternatesCLSID"$$
$$SR_LOCALIZED_DESCRIPTION = "Description"$$
$LIBID_SpeechDDKLib = GUID$("{9903F14C-12CE-4C99-9986-2EE3D7D588A8}")
' ========================================================================================
' ProgIDs (Program identifiers)
' ========================================================================================
' CLSID = {D9F6EE60-58C9-458B-88E1-2F908FD7F87C}
$PROGID_SpDataKey1 = "SAPI.SpDataKey.1"
' CLSID = {DA93E903-C843-11D2-A084-00C04F8EF9B5}
$PROGID_SpGramCompBackend1 = "SAPI.SpGramCompBackEnd.1"
' CLSID = {B1E29D59-A675-11D2-8302-00C04F8EE6C0}
$PROGID_SpGrammarCompiler1 = "SAPI.SpGrammarCompiler.1"
' CLSID = {12D73610-A1C9-11D3-BC90-00C04F72DF9F}
$PROGID_SpITNProcessor1 = "SAPI.SpITNProcessor.1"
' CLSID = {3918D75F-0ACB-41F2-B733-92AA15BCECF6}
$PROGID_SpObjectTokenEnum1 = "SAPI.SpObjectTokenEnum.1"
' CLSID = {777B6BBD-2FF2-11D3-88FE-00C04F8EF9B5}
$PROGID_SpPhraseBuilder1 = "SAPI.SpPhraseBuilder.1"
' ========================================================================================
' Version independent ProgIDs
' ========================================================================================
' CLSID = {D9F6EE60-58C9-458B-88E1-2F908FD7F87C}
$PROGID_SpDataKey = "SAPI.SpDataKey"
' CLSID = {DA93E903-C843-11D2-A084-00C04F8EF9B5}
$PROGID_SpGramCompBackend = "SAPI.SpGramCompBackEnd"
' CLSID = {B1E29D59-A675-11D2-8302-00C04F8EE6C0}
$PROGID_SpGrammarCompiler = "SAPI.SpGrammarCompiler"
' CLSID = {12D73610-A1C9-11D3-BC90-00C04F72DF9F}
$PROGID_SpITNProcessor = "SAPI.SpITNProcessor"
' CLSID = {3918D75F-0ACB-41F2-B733-92AA15BCECF6}
$PROGID_SpObjectTokenEnum = "SAPI.SpObjectTokenEnum"
' CLSID = {777B6BBD-2FF2-11D3-88FE-00C04F8EF9B5}
$PROGID_SpPhraseBuilder = "SAPI.SpPhraseBuilder"
' ========================================================================================
' ClsIDs (Class identifiers)
' ========================================================================================
$CLSID_SpW3CGrammarCompiler = GUID$("{D2C13906-51EF-454E-BC67-A52475FF074C}")
$CLSID_SpDataKey = GUID$("{D9F6EE60-58C9-458B-88E1-2F908FD7F87C}")
$CLSID_SpGramCompBackend = GUID$("{DA93E903-C843-11D2-A084-00C04F8EF9B5}")
$CLSID_SpGrammarCompiler = GUID$("{B1E29D59-A675-11D2-8302-00C04F8EE6C0}")
$CLSID_SpITNProcessor = GUID$("{12D73610-A1C9-11D3-BC90-00C04F72DF9F}")
$CLSID_SpObjectTokenEnum = GUID$("{3918D75F-0ACB-41F2-B733-92AA15BCECF6}")
$CLSID_SpPhraseBuilder = GUID$("{777B6BBD-2FF2-11D3-88FE-00C04F8EF9B5}")
' ========================================================================================
' IIDs (Interface identifiers)
' ========================================================================================
$IID_ISpErrorLog = GUID$("{F4711347-E608-11D2-A086-00C04F8EF9B5}")
$IID_ISpGramCompBackend = GUID$("{3DDCA27C-665C-4786-9F97-8C90C3488B61}")
$IID_ISpGrammarCompiler = GUID$("{B1E29D58-A675-11D2-8302-00C04F8EE6C0}")
$IID_ISpITNProcessor = GUID$("{12D7360F-A1C9-11D3-BC90-00C04F72DF9F}")
$IID_ISpObjectTokenEnumBuilder = GUID$("{06B64F9F-7FDA-11D2-B4F2-00C04F797396}")
$IID_ISpPhraseBuilder = GUID$("{88A3342A-0BED-4834-922B-88D43173162F}")
$IID_ISpTokenUI = GUID$("{F8E690F0-39CB-4843-B8D7-C84696E1119D}")
$IID_ISpThreadControl = GUID$("{A6BE4D73-4403-4358-B22D-0346E23B1764}")
$IID_ISpTaskManager = GUID$("{2BAEEF81-2CA3-4331-98F3-26EC5ABEFB03}")
$IID_ISpTTSEngineSite = GUID$("{9880499B-CCE9-11D2-B503-00C04F797396}")
$IID_ISpTTSEngine = GUID$("{A74D7C8E-4CC5-4F2F-A6EB-804DEE18500E}")
$IID_ISpCFGInterpreterSite = GUID$("{6A6FFAD8-78B6-473D-B844-98152E4FB16B}")
$IID_ISpCFGInterpreter = GUID$("{F3D3F926-11FC-11D3-BB97-00C04F8EE6C0}")
$IID_ISpSREngineSite = GUID$("{3B414AEC-720C-4883-B9EF-178CD394FB3A}")
$IID_ISpSREngineSite2 = GUID$("{7BC6E012-684A-493E-BDD4-2BF5FBF48CFE}")
$IID_ISpSREngine = GUID$("{2F472991-854B-4465-B613-FBAFB3AD8ED8}")
$IID_ISpSREngine2 = GUID$("{7BA627D8-33F9-4375-90C5-9985AEE5EDE5}")
$IID_ISpSRAlternates = GUID$("{FECE8294-2BE1-408F-8E68-2DE377092F0E}")
$IID_ISpSRAlternates2 = GUID$("{F338F437-CB33-4020-9CAB-C71FF9CE12D3}")
$IID__ISpPrivateEngineCall = GUID$("{8E7C791E-4467-11D3-9723-00C04F72DB08}")
$IID_ISpPrivateEngineCallEx = GUID$("{DEFD682A-FE0A-42B9-BFA1-56D3D6CECFAF}")
$IID_ISpTaskManager = GUID$("{2BAEEF81-2CA3-4331-98F3-26EC5ABEFB03}")
$IID_ISpTTSEngineSite = GUID$("{9880499B-CCE9-11D2-B503-00C04F797396}")
$IID_ISpTTSEngine = GUID$("{A74D7C8E-4CC5-4F2F-A6EB-804DEE18500E}")
$IID_ISpCFGInterpreterSite = GUID$("{6A6FFAD8-78B6-473D-B844-98152E4FB16B}")
$IID_ISpCFGInterpreterSite = GUID$("{6A6FFAD8-78B6-473D-B844-98152E4FB16B}")
$IID_ISpCFGInterpreter = GUID$("{F3D3F926-11FC-11D3-BB97-00C04F8EE6C0}")
$IID_ISpSREngineSite = GUID$("{3B414AEC-720C-4883-B9EF-178CD394FB3A}")
$IID_ISpSREngineSite2 = GUID$("{7BC6E012-684A-493E-BDD4-2BF5FBF48CFE}")
$IID_ISpSREngine = GUID$("{2F472991-854B-4465-B613-FBAFB3AD8ED8}")
$IID_ISpSREngine2 = GUID$("{7BA627D8-33F9-4375-90C5-9985AEE5EDE5}")
$IID_ISpSRAlternates = GUID$("{FECE8294-2BE1-408F-8E68-2DE377092F0E}")
$IID_ISpSRAlternates2 = GUID$("{F338F437-CB33-4020-9CAB-C71FF9CE12D3}")
$IID__ISpPrivateEngineCall = GUID$("{8E7C791E-4467-11D3-9723-00C04F72DB08}")
$IID__ISpPrivateEngineCallEx = GUID$("{DEFD682A-FE0A-42B9-BFA1-56D3D6CECFAF}")
' ########################################################################################
' Interface name = ISpTokenUI
' IID = {F8E690F0-39CB-4843-B8D7-C84696E1119D}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpTokenUI_INTERFACE_DEFINED)
 %ISpTokenUI_INTERFACE_DEFINED = 1
INTERFACE ISpTokenUI $IID_ISpTokenUI
 INHERIT IUnknown
 ' =====================================================================================
 METHOD IsUISupported ( ' VTable offset = 12
 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 = 16
 BYVAL hwndParent AS DWORD
 , BYREF pszTitle AS WSTRINGZ
 , BYREF pszTypeOfUI AS WSTRINGZ
 , BYVAL pvExtraData AS DWORD
 , BYVAL cbExtraData AS DWORD
 , BYVAL pToken AS ISpObjectToken
 , BYVAL punkObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpTokenUI_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpObjectTokenEnumBuilder
' IID = {06B64F9F-7FDA-11D2-B4F2-00C04F797396}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IEnumSpObjectTokens
' ########################################################################################
#IF NOT %DEF(%ISpObjectTokenEnumBuilder_INTERFACE_DEFINED)
 %ISpObjectTokenEnumBuilder_INTERFACE_DEFINED = 1
INTERFACE ISpObjectTokenEnumBuilder $IID_ISpObjectTokenEnumBuilder
 INHERIT IUnknown
 ' =====================================================================================
 ' IEnumSpObjectTokens Methods
 ' =====================================================================================
 ' =====================================================================================
 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
 ' =====================================================================================
 ' =====================================================================================
 ' ISpObjectTokenEnumBuilder Methods
 ' =====================================================================================
 METHOD SetAttribs ( ' VTable offset = 36
 BYREF pszReqAttribs AS WSTRINGZ
 , BYREF pszOptAttribs AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD AddTokens ( ' VTable offset = 40
 BYVAL cTokens AS DWORD
 , BYREF pToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD AddTokensFromDataKey ( ' VTable offset = 44
 BYVAL pDataKey AS ISpDataKey
 , BYREF pszSubKey AS WSTRINGZ
 , BYREF pszCategoryId AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD AddTokensFromTokenEnum ( ' VTable offset = 48
 BYVAL pTokenEnum AS IEnumSpObjectTokens
 ) AS LONG
 ' =====================================================================================
 METHOD Sort ( ' VTable offset = 52
 BYREF pszTokenIdToListFirst AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpObjectTokenEnumBuilder_INTERFACE_DEFINED__ */
'typedef void *SPWORDHANDLE;
'typedef void *SPRULEHANDLE;
'typedef void *SPGRAMMARHANDLE;
'typedef void *SPRECOCONTEXTHANDLE;
'typedef void *SPPHRASERULEHANDLE;
'typedef void *SPPHRASEPROPERTYHANDLE;
'typedef void *SPTRANSITIONID;
' ########################################################################################
' Interface name = ISpErrorLog
' IID = {F4711347-E608-11D2-A086-00C04F8EF9B5}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpErrorLog_INTERFACE_DEFINED)
 %ISpErrorLog_INTERFACE_DEFINED = 1
INTERFACE ISpErrorLog $IID_ISpErrorLog
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AddError ( ' VTable offset = 12
 BYVAL lLineNumber AS LONG
 , BYVAL hr AS LONG
 , BYREF pszDescription AS WSTRINGZ
 , BYREF pszHelpFile AS WSTRINGZ
 , BYVAL dwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpErrorLog_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpGrammarCompiler
' IID = {B1E29D58-A675-11D2-8302-00C04F8EE6C0}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpGrammarCompiler_INTERFACE_DEFINED)
 %ISpGrammarCompiler_INTERFACE_DEFINED = 1
INTERFACE ISpGrammarCompiler $IID_ISpGrammarCompiler
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CompileStream ( ' VTable offset = 12
 BYVAL pSource AS IStream
 , BYVAL pDest AS IStream
 , BYVAL pHeader AS IStream
 , BYVAL pReserved AS IUnknown
 , BYVAL pErrorLog AS ISpErrorLog
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpGrammarCompiler_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpGramCompBackend
' IID = {3DDCA27C-665C-4786-9F97-8C90C3488B61}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpGrammarBuilder
' ########################################################################################
#IF NOT %DEF(%ISpGramCompBackend_INTERFACE_DEFINED)
 %ISpGramCompBackend_INTERFACE_DEFINED = 1
INTERFACE ISpGramCompBackend $IID_ISpGramCompBackend
 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
 ' =====================================================================================
 ' =====================================================================================
 ' ISpGramCompBackend Methods
 ' =====================================================================================
 METHOD SetSaveObjects ( ' VTable offset = 44
 BYVAL pStream AS IStream
 , BYVAL pErrorLog AS ISpErrorLog
 ) AS LONG
 ' =====================================================================================
 METHOD InitFromBinaryGrammar ( ' VTable offset = 48
 BYREF pBinaryData AS SPBINARYGRAMMAR
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpGramCompBackend_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpITNProcessor
' IID = {12D7360F-A1C9-11D3-BC90-00C04F72DF9F}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpITNProcessor_INTERFACE_DEFINED)
 %ISpITNProcessor_INTERFACE_DEFINED = 1
INTERFACE ISpITNProcessor $IID_ISpITNProcessor
 INHERIT IUnknown
 ' =====================================================================================
 METHOD LoadITNGrammar ( ' VTable offset = 12
 BYREF pszCLSID AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD ITNPhrase ( ' VTable offset = 16
 BYVAL pPhrase AS ISpPhraseBuilder
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpITNProcessor_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpPhraseBuilder
' IID = {88A3342A-0BED-4834-922B-88D43173162F}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = ISpPhrase
' ########################################################################################
#IF NOT %DEF(%ISpPhraseBuilder_INTERFACE_DEFINED)
 %ISpPhraseBuilder_INTERFACE_DEFINED = 1
INTERFACE ISpPhraseBuilder $IID_ISpPhraseBuilder
 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
 ' =====================================================================================
 ' =====================================================================================
 ' ISpPhraseBuilder Methods
 ' =====================================================================================
 METHOD InitFromPhrase ( ' VTable offset = 28
 BYREF pPhrase AS SPPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD InitFromSerializedPhrase ( ' VTable offset = 32
 BYREF pPhrase AS SPSERIALIZEDPHRASE
 ) AS LONG
 ' =====================================================================================
 METHOD AddElements ( ' VTable offset = 36
 BYVAL cElements AS DWORD
 , BYREF pElement AS SPPHRASEELEMENT
 ) AS LONG
 ' =====================================================================================
 METHOD AddRules ( ' VTable offset = 40
 BYVAL hParent AS DWORD
 , BYREF pRule AS SPPHRASERULE
 , BYREF phNewRule AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddProperties ( ' VTable offset = 44
 BYVAL hParent AS DWORD
 , BYREF pProperty AS SPPHRASEPROPERTY
 , BYREF phNewProperty AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddReplacements ( ' VTable offset = 48
 BYVAL cReplacements AS DWORD
 , BYREF pReplacements AS SPPHRASEREPLACEMENT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpPhraseBuilder_INTERFACE_DEFINED__ */
'#if defined(__cplusplus)
'interface ISpTask
'{
'virtual HRESULT STDMETHODCALLTYPE Execute(
' void *pvTaskData,
' volatile const BOOL* pfContinueProcessing) = 0;
'};
'#else
'typedef void *ISpTask;
'#endif
'#if defined(__cplusplus)
'interface ISpThreadTask
'{
'virtual HRESULT STDMETHODCALLTYPE InitThread(
' void * pvTaskData,
' HWND hwnd) = 0;
'virtual HRESULT STDMETHODCALLTYPE ThreadProc(
' void *pvTaskData,
' HANDLE hExitThreadEvent,
' HANDLE hNotifyEvent,
' HWND hwndWorker,
' volatile const BOOL * pfContinueProcessing) = 0;
'virtual LRESULT STDMETHODCALLTYPE WindowMessage(
' void *pvTaskData,
' HWND hWnd,
' UINT Msg,
' WPARAM wParam,
' LPARAM lParam) = 0;
'};
'#else
'typedef void *ISpThreadTask;
'#endif
' ########################################################################################
' Interface name = ISpThreadControl
' IID = {A6BE4D73-4403-4358-B22D-0346E23B1764}
' Inherited interface = ISpNotifySink
' ########################################################################################
#IF NOT %DEF(%ISpThreadControl_INTERFACE_DEFINED)
 %ISpThreadControl_INTERFACE_DEFINED = 1
INTERFACE ISpThreadControl $IID_ISpThreadControl
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpNotifySink method
 ' =====================================================================================
 METHOD Notify ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpThreadControl methods
 ' =====================================================================================
 METHOD StartThread ( ' VTable offset = 16
 BYVAL dwFlags AS DWORD
 , BYREF phwnd AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD WaitForThreadDone ( ' VTable offset = 20
 BYVAL fForceStop AS LONG
 , BYREF phrThreadResult AS LONG
 , BYVAL msTimeOut AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD TerminateThread ( ' VTable offset = 24
 ) AS LONG
 ' =====================================================================================
 METHOD ThreadHandle ( ' VTable offset = 28
 ) AS DWORD
 ' =====================================================================================
 METHOD ThreadId ( ' VTable offset = 32
 ) AS DWORD
 ' =====================================================================================
 METHOD NotifyEvent ( ' VTable offset = 36
 ) AS DWORD
 ' =====================================================================================
 METHOD WindowHandle ( ' VTable offset = 40
 ) AS DWORD
 ' =====================================================================================
 METHOD ThreadCompleteEvent ( ' VTable offset = 44
 ) AS DWORD
 ' =====================================================================================
 METHOD ExitThreadEvent ( ' VTable offset = 48
 ) AS DWORD
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpThreadControl_INTERFACE_DEFINED__ */
' // Size = 16 bytes
TYPE SPTMTHREADINFO DWORD
 lPoolSize AS LONG ' long
 lPriority AS LONG ' long
 ulConcurrencyLimit AS DWORD ' ULONG
 ulMaxQuickAllocThreads AS DWORD ' ULONG
END TYPE
' ########################################################################################
' Interface name = ISpTaskManager
' IID = {2BAEEF81-2CA3-4331-98F3-26EC5ABEFB03}
' Inherited interface = IUnknown
' ########################################################################################
'#IF NOT %DEF(%ISpTaskManager_INTERFACE_DEFINED)
' %ISpTaskManager_INTERFACE_DEFINED = 1
'INTERFACE ISpTaskManager $IID_ISpTaskManager
' INHERIT IUnknown
' ' =====================================================================================
' METHOD SetThreadPoolInfo ( ' VTable offset = 12
' BYREF pPoolInfo AS SPTMTHREADINFO
' ) AS LONG
' ' =====================================================================================
' METHOD GetThreadPoolInfo ( ' VTable offset = 16
' BYREF pPoolInfo AS SPTMTHREADINFO
' ) AS LONG
' ' =====================================================================================
' METHOD QueueTask ( ' VTable offset = 20
' BYVAL pTask AS ISpTask
' , BYVAL pvTaskData AS DWORD
' , BYVAL hCompEvent AS DWORD
' , BYREF pdwGroupId AS DWORD
' , BYREF pTaskID AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD CreateReoccurringTask ( ' VTable offset = 24
' BYVAL pTask AS ISpTask
' , BYVAL pvTaskData AS DWORD
' , BYVAL hCompEvent AS DWORD
' , BYREF ppTaskCtrl AS ISpNotifySink
' ) AS LONG
' ' =====================================================================================
' METHOD CreateThreadControl ( ' VTable offset = 28
' BYVAL pTask AS ISpThreadTask
' , BYVAL pvTaskData AS DWORD
' , BYVAL nPriority AS LONG
' , BYREF ppTaskCtrl AS ISpThreadControl
' ) AS LONG
' ' =====================================================================================
' METHOD TerminateTask ( ' VTable offset = 32
' BYVAL dwTaskId AS DWORD
' , BYVAL ulWaitPeriod AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD TerminateTaskGroup ( ' VTable offset = 36
' BYVAL dwGroupId AS DWORD
' , BYVAL ulWaitPeriod AS DWORD
' ) AS LONG
' ' =====================================================================================
'END INTERFACE
'#ENDIF ' /* __ISpTaskManager_INTERFACE_DEFINED__ */
' enum SPVSKIPTYPE
%EQUATE `SPVST_SENTENCE = 1 ' ( 1L << 0 )
' enum SPVESACTIONS
%EQUATE `SPVES_CONTINUE = 0
%EQUATE `SPVES_ABORT = 1 ' ( 1L << 0 )
%EQUATE `SPVES_SKIP = 2 ' ( 1L << 1 )
%EQUATE `SPVES_RATE = 4 ' ( 1L << 2 )
%EQUATE `SPVES_VOLUME = 8 ' ( 1L << 3 )
' ########################################################################################
' Interface name = ISpTTSEngineSite
' IID = {9880499B-CCE9-11D2-B503-00C04F797396}
' Inherited interface = ISpEventSink
' ########################################################################################
#IF NOT %DEF(%ISpTTSEngineSite_INTERFACE_DEFINED)
 %ISpTTSEngineSite_INTERFACE_DEFINED = 1
INTERFACE ISpTTSEngineSite $IID_ISpTTSEngineSite
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpEventSink methods
 ' =====================================================================================
 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
 ' =====================================================================================
 ' =====================================================================================
 ' ISpTTSEngineSite methods
 ' =====================================================================================
 METHOD GetActions ( ' VTable offset = 20
 ) AS DWORD
 ' =====================================================================================
 METHOD Write ( ' VTable offset = 24
 BYVAL pBuff AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbWritten AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRate ( ' VTable offset = 28
 BYREF pRateAdjust AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetVolume ( ' VTable offset = 32
 BYREF pusVolume AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSkipInfo ( ' VTable offset = 36
 BYREF peType AS LONG
 , BYREF plNumItems AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompleteSkip ( ' VTable offset = 40
 BYVAL ulNumSkipped AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpTTSEngineSite_INTERFACE_DEFINED__ */
' // Size = 68 bytes
TYPE SPVTEXTFRAG DWORD
 pNext AS SPVTEXTFRAG PTR ' struct SPVTEXTFRAG *
 State AS SPVSTATE ' SPVSTATE
 pTextStart AS WSTRINGZ PTR
 ulTextLen AS DWORD ' ULONG
 ulTextSrcOffset AS DWORD ' ULONG
END TYPE
' ########################################################################################
' Interface name = ISpTTSEngine
' IID = {A74D7C8E-4CC5-4F2F-A6EB-804DEE18500E}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpTTSEngine_INTERFACE_DEFINED)
 %ISpTTSEngine_INTERFACE_DEFINED = 1
INTERFACE ISpTTSEngine $IID_ISpTTSEngine
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Speak ( ' VTable offset = 12
 BYVAL dwSpeakFlags AS DWORD
 , BYREF rguidFormatId AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 , BYREF pTextFragList AS SPVTEXTFRAG
 , BYVAL pOutputSite AS ISpTTSEngineSite
 ) AS LONG
 ' =====================================================================================
 METHOD GetOutputFormat ( ' VTable offset = 16
 BYREF pTargetFmtId AS GUID
 , BYREF pTargetWaveFormatEx AS WAVEFORMATEX
 , BYREF pOutputFormatId AS GUID
 , BYREF ppCoMemOutputWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpTTSEngine_INTERFACE_DEFINED__ */
' // Size = 24 bytes
TYPE SPWORDENTRY DWORD FILL
 hWord AS DWORD ' SPWORDHANDLE
 LangID AS WORD ' WORD
 pszDisplayText AS WSTRINGZ PTR ' WCHAR *
 pszLexicalForm AS WSTRINGZ PTR ' WCHAR *
 aPhoneId AS WSTRINGZ PTR ' SPPHONEID *
 pvClientContext AS DWORD ' void *
END TYPE
' // Size = 20 bytes
TYPE SPRULEENTRY DWORD
 hRule AS DWORD ' SPRULEHANDLE
 hInitialState AS DWORD ' SPSTATEHANDLE
 Attributes AS DWORD
 pvClientRuleContext AS DWORD ' void *
 pvClientGrammarContext AS DWORD ' void *
END TYPE
' enum SPTRANSITIONTYPE
%EQUATE `SPTRANSEPSILON = 0
%EQUATE `SPTRANSWORD = %SPTRANSEPSILON + 1
%EQUATE `SPTRANSRULE = %SPTRANSWORD + 1
%EQUATE `SPTRANSTEXTBUF = %SPTRANSRULE + 1
%EQUATE `SPTRANSWILDCARD = %SPTRANSTEXTBUF + 1
%EQUATE `SPTRANSDICTATION = %SPTRANSWILDCARD + 1
' // Size = 4 bytes
TYPE SPTRANSITIONENTRY_STRUCT_1 DWORD
 fHasProperty AS DWORD
END TYPE
' // Size = 12 bytes
TYPE SPTRANSITIONENTRY_UNION_STRUCT_1 DWORD
 hRuleInitialState AS DWORD ' SPSTATEHANDLE
 hRule AS DWORD ' SPSTATEHANDLE
 pvClientRuleContext AS DWORD ' void *
END TYPE
' // Size = 8 bytes
TYPE SPTRANSITIONENTRY_UNION_STRUCT_2 DWORD
 hWord AS DWORD ' SPWORDHANDLE
 pvClientWordContext AS DWORD ' void *
END TYPE
' // Size = 4 bytes
TYPE SPTRANSITIONENTRY_UNION_STRUCT_3 DWORD
 pvGrammarCookie AS DWORD ' void *
END TYPE
' // Size = 12 bytes
UNION SPTRANSITIONENTRY_UNION DWORD
 SPTRANSITIONENTRY_UNION_STRUCT_1
 SPTRANSITIONENTRY_UNION_STRUCT_2
 SPTRANSITIONENTRY_UNION_STRUCT_3
END UNION
' // Size = 32 bytes
TYPE SPTRANSITIONENTRY BYTE
 ID AS DWORD ' SPTRANSITIONID
 hNextState AS DWORD ' SPSTATEHANDLE
 Type AS BYTE ' BYTE
 RequiredConfidence AS BYTE ' char
 SPTRANSITIONENTRY_STRUCT_1
 Weight AS SINGLE ' float
 SPTRANSITIONENTRY_UNION
END TYPE
' // Size = 32 bytes
TYPE SPTRANSITIONPROPERTY QWORD FILL ' Must be 8 byte aligned
 pszName AS WSTRINGZ PTR
 ulId AS DWORD ' ULONG
 pszValue AS WSTRINGZ PTR
 vValue AS tagVARIANT ' VARIANT
END TYPE
' // Size = 24 bytes
TYPE SPSTATEINFO DWORD
 cAllocatedEntries AS DWORD ' ULONG
 pTransitions AS SPTRANSITIONENTRY PTR ' SPTRANSITIONENTRY *
 cEpsilons AS DWORD ' ULONG
 cRules AS DWORD ' ULONG
 cWords AS DWORD ' ULONG
 cSpecialTransitions AS DWORD ' ULONG
END TYPE
' // Size = 48 bytes
TYPE SPPATHENTRY DWORD
 hTransition AS DWORD ' SPTRANSITIONID
 elem AS SPPHRASEELEMENT ' SPPHRASEELEMENT
END TYPE
' ########################################################################################
' Interface name = ISpCFGInterpreterSite
' IID = {F8E690F0-39CB-4843-B8D7-C84696E1119D}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpCFGInterpreterSite_INTERFACE_DEFINED)
 %ISpCFGInterpreterSite_INTERFACE_DEFINED = 1
INTERFACE ISpCFGInterpreterSite $IID_ISpCFGInterpreterSite
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AddTextReplacement ( ' VTable offset = 12
 BYREF pReplace AS SPPHRASEREPLACEMENT
 ) AS LONG
 ' =====================================================================================
 METHOD AddProperty ( ' VTable offset = 16
 BYREF pProperty AS SPPHRASEPROPERTY
 ) AS LONG
 ' =====================================================================================
 METHOD GetResourceValue ( ' VTable offset = 20
 BYREF pszResourceName AS WSTRINGZ
 , BYREF ppCoMemResource AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpCFGInterpreterSite_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpCFGInterpreter
' IID = {F3D3F926-11FC-11D3-BB97-00C04F8EE6C0}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpCFGInterpreter_INTERFACE_DEFINED)
 %ISpCFGInterpreter_INTERFACE_DEFINED = 1
INTERFACE ISpCFGInterpreter $IID_ISpCFGInterpreter
 INHERIT IUnknown
 ' =====================================================================================
 METHOD InitGrammar ( ' VTable offset = 12
 BYREF pszGrammarName AS WSTRINGZ
 , BYREF pvGrammarData AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Interpret ( ' VTable offset = 16
 BYVAL pPhrase AS ISpPhraseBuilder
 , BYVAL ulFirstElement AS DWORD
 , BYVAL ulCountOfElements AS DWORD
 , BYVAL pSite AS ISpCFGInterpreterSite
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpCFGInterpreter_INTERFACE_DEFINED__ */
' enum SPCFGNOTIFY
%EQUATE `SPCFGN_ADD = 0
%EQUATE `SPCFGN_REMOVE = %SPCFGN_ADD + 1
%EQUATE `SPCFGN_INVALIDATE = %SPCFGN_REMOVE + 1
%EQUATE `SPCFGN_ACTIVATE = %SPCFGN_INVALIDATE + 1
%EQUATE `SPCFGN_DEACTIVATE = %SPCFGN_ACTIVATE + 1
' enum SPRESULTTYPE
%EQUATE `SPRT_CFG = 0
%EQUATE `SPRT_SLM = 1
%EQUATE `SPRT_PROPRIETARY = 2
%EQUATE `SPRT_FALSE_RECOGNITION = 5 ' ( 1L << 2 )
%EQUATE `SPRT_TYPE_MASK = 3
%EQUATE `SPRT_EMULATED = 8 ' ( 1L << 3 )
%EQUATE `SPRT_EXTENDABLE_PARSE = 16 ' ( 1L << 4 )
' // Size = 24 bytes
TYPE SPPHRASEALT DWORD
 pPhrase AS DWORD PTR ' ISpPhraseBuilder *
 ulStartElementInParent AS DWORD ' ULONG
 cElementsInParent AS DWORD ' ULONG
 cElementsInAlternate AS DWORD ' ULONG
 pvAltExtra AS DWORD ' void *
 cbAltExtra AS DWORD ' ULONG
END TYPE
' // Size = 56 bytes
TYPE SPRECORESULTINFO QWORD FILL
 cbSize AS DWORD ' ULONG
 eResultType AS LONG ' SPRESULTTYPE
 fHypothesis AS LONG
 fProprietaryAutoPause AS LONG
 ullStreamPosStart AS QUAD ' ULONGLONG
 ullStreamPosEnd AS QUAD ' ULONGLONG
 hGrammar AS DWORD ' SPGRAMMARHANDLE
 ulSizeEngineData AS DWORD ' ULONG
 pvEngineData AS DWORD ' void *
 pPhrase AS DWORD PTR ' ISpPhraseBuilder *
 aPhraseAlts AS SPPHRASEALT PTR ' SPPHRASEALT *
 ulNumAlts AS DWORD ' ULONG
END TYPE
' // Size = 72 bytes
TYPE SPRECORESULTINFOEX QWORD FILL
 SPRECORESULTINFO
 ullStreamTimeStart AS QUAD ' ULONGLONG
 ullStreamTimeEnd AS QUAD ' ULONGLONG
END TYPE
' enum SPWORDINFOOPT
%EQUATE `SPWIO_NONE = 0
%EQUATE `SPWIO_WANT_TEXT = 1
' enum SPRULEINFOOPT
%EQUATE `SPRIO_NONE = 0
' // Size = 56 bytes
TYPE SPPARSEINFO DWORD
 cbSize AS DWORD ' ULONG
 hRule AS DWORD ' SPRULEHANDLE
 ullAudioStreamPosition AS QUAD ' ULONGLONG
 ulAudioSize AS DWORD ' ULONG
 cTransitions AS DWORD ' ULONG
 pPath AS SPPATHENTRY PTR ' SPPATHENTRY *
 SREngineID AS GUID ' GUID
 ulSREnginePrivateDataSize AS DWORD ' ULONG
 pSREnginePrivateData AS BYTE PTR ' const BYTE *
 fHypothesis AS LONG
END TYPE
' ########################################################################################
' Interface name = ISpSREngineSite
' IID = {3B414AEC-720C-4883-B9EF-178CD394FB3A}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpSREngineSite_INTERFACE_DEFINED)
 %ISpSREngineSite_INTERFACE_DEFINED = 1
INTERFACE ISpSREngineSite $IID_ISpSREngineSite
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 12
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DataAvailable ( ' VTable offset = 16
 BYREF pcb AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetBufferNotifySize ( ' VTable offset = 20
 BYVAL cbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ParseFromTransitions ( ' VTable offset = 24
 BYREF pParseInfo AS SPPARSEINFO
 , BYREF ppNewPhrase AS ISpPhraseBuilder
 ) AS LONG
 ' =====================================================================================
 METHOD Recognition ( ' VTable offset = 28
 BYREF pResultInfo AS SPRECORESULTINFO
 ) AS LONG
 ' =====================================================================================
 METHOD AddEvent ( ' VTable offset = 32
 BYREF pEvent AS SPEVENT
 , BYVAL hSAPIRecoContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Synchronize ( ' VTable offset = 36
 BYVAL ullProcessedThruPos AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetWordInfo ( ' VTable offset = 40
 BYREF pWordEntry AS SPWORDENTRY
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetWordClientContext ( ' VTable offset = 44
 BYVAL hWord AS DWORD
 , BYVAL pvClientContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRuleInfo ( ' VTable offset = 48
 BYREF pRuleEntry AS SPRULEENTRY
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetRuleClientContext ( ' VTable offset = 52
 BYVAL hRule AS DWORD
 , BYVAL pvClientContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStateInfo ( ' VTable offset = 56
 BYVAL hState AS DWORD
 , BYREF pStateInfo AS SPSTATEINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetResource ( ' VTable offset = 60
 BYVAL hRule AS DWORD
 , BYREF pszResourceName AS WSTRINGZ
 , BYREF ppCoMemResource AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTransitionProperty ( ' VTable offset = 64
 BYVAL ID AS LONG
 , BYREF ppCoMemProperty AS SPTRANSITIONPROPERTY
 ) AS LONG
 ' =====================================================================================
 METHOD IsAlternate ( ' VTable offset = 68
 BYVAL hRule AS DWORD
 , BYVAL hAltRule AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMaxAlternates ( ' VTable offset = 72
 BYVAL hRule AS DWORD
 , BYREF pulNumAlts AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetContextMaxAlternates ( ' VTable offset = 76
 BYVAL hContext AS DWORD
 , BYREF pulNumAlts AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UpdateRecoPos ( ' VTable offset = 80
 BYVAL ullCurrentRecoPos AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpSREngineSite_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpSREngineSite2
' IID = {7BC6E012-684A-493E-BDD4-2BF5FBF48CFE}
' Inherited interface = ISpSREngineSite
' ########################################################################################
#IF NOT %DEF(%ISpSREngineSite2_INTERFACE_DEFINED)
 %ISpSREngineSite2_INTERFACE_DEFINED = 1
INTERFACE ISpSREngineSite2 $IID_ISpSREngineSite2
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpSREngineSite methods
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 12
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DataAvailable ( ' VTable offset = 16
 BYREF pcb AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetBufferNotifySize ( ' VTable offset = 20
 BYVAL cbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ParseFromTransitions ( ' VTable offset = 24
 BYREF pParseInfo AS SPPARSEINFO
 , BYREF ppNewPhrase AS ISpPhraseBuilder
 ) AS LONG
 ' =====================================================================================
 METHOD Recognition ( ' VTable offset = 28
 BYREF pResultInfo AS SPRECORESULTINFO
 ) AS LONG
 ' =====================================================================================
 METHOD AddEvent ( ' VTable offset = 32
 BYREF pEvent AS SPEVENT
 , BYVAL hSAPIRecoContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Synchronize ( ' VTable offset = 36
 BYVAL ullProcessedThruPos AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetWordInfo ( ' VTable offset = 40
 BYREF pWordEntry AS SPWORDENTRY
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetWordClientContext ( ' VTable offset = 44
 BYVAL hWord AS DWORD
 , BYVAL pvClientContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRuleInfo ( ' VTable offset = 48
 BYREF pRuleEntry AS SPRULEENTRY
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetRuleClientContext ( ' VTable offset = 52
 BYVAL hRule AS DWORD
 , BYVAL pvClientContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStateInfo ( ' VTable offset = 56
 BYVAL hState AS DWORD
 , BYREF pStateInfo AS SPSTATEINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetResource ( ' VTable offset = 60
 BYVAL hRule AS DWORD
 , BYREF pszResourceName AS WSTRINGZ
 , BYREF ppCoMemResource AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTransitionProperty ( ' VTable offset = 64
 BYVAL ID AS LONG
 , BYREF ppCoMemProperty AS SPTRANSITIONPROPERTY
 ) AS LONG
 ' =====================================================================================
 METHOD IsAlternate ( ' VTable offset = 68
 BYVAL hRule AS DWORD
 , BYVAL hAltRule AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMaxAlternates ( ' VTable offset = 72
 BYVAL hRule AS DWORD
 , BYREF pulNumAlts AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetContextMaxAlternates ( ' VTable offset = 76
 BYVAL hContext AS DWORD
 , BYREF pulNumAlts AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UpdateRecoPos ( ' VTable offset = 80
 BYVAL ullCurrentRecoPos AS QUAD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpSREngineSite2 methods
 ' =====================================================================================
 METHOD AddEventEx ( ' VTable offset = 84
 BYREF pEvent AS SPEVENTEX
 , BYVAL hSAPIRecoContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UpdateRecoPosEx ( ' VTable offset = 88
 BYVAL ullCurrentRecoPos AS QUAD
 , BYVAL ullCurrentRecoTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRuleTransition ( ' VTable offset = 92
 BYVAL ulGrammarID AS DWORD
 , BYVAL RuleIndex AS DWORD
 , BYREF pTrans AS SPTRANSITIONENTRY
 ) AS LONG
 ' =====================================================================================
 METHOD RecognitionEx ( ' VTable offset = 96
 BYREF pResultInfo AS SPRECORESULTINFOEX
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpSREngineSite2_INTERFACE_DEFINED__ */
' enum SPPROPSRC
%EQUATE `SPPROPSRC_RECO_INST = 0
%EQUATE `SPPROPSRC_RECO_CTX = %SPPROPSRC_RECO_INST + 1
%EQUATE `SPPROPSRC_RECO_GRAMMAR = %SPPROPSRC_RECO_CTX + 1
' ########################################################################################
' Interface name = ISpSREngine
' IID = {2F472991-854B-4465-B613-FBAFB3AD8ED8}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpSREngine_INTERFACE_DEFINED)
 %ISpSREngine_INTERFACE_DEFINED = 1
INTERFACE ISpSREngine $IID_ISpSREngine
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetSite ( ' VTable offset = 12
 BYVAL pSite AS ISpSREngineSite
 ) AS LONG
 ' =====================================================================================
 METHOD GetInputAudioFormat ( ' VTable offset = 16
 BYREF pguidSourceFormatId AS GUID
 , BYREF pSourceWaveFormatEx AS WAVEFORMATEX
 , BYREF pguidDesiredFormatId AS GUID
 , BYREF ppCoMemDesiredWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD RecognizeStream ( ' VTable offset = 20
 BYREF rguidFmtId AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 , BYVAL hRequestSync AS DWORD
 , BYVAL hDataAvailable AS DWORD
 , BYVAL hExit AS DWORD
 , BYVAL fNewAudioStream AS LONG
 , BYVAL fRealTimeAudio AS LONG
 , BYVAL pAudioObjectToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD SetRecoProfile ( ' VTable offset = 24
 BYVAL pProfile AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD OnCreateGrammar ( ' VTable offset = 28
 BYVAL pvEngineRecoContext AS DWORD
 , BYVAL hSAPIGrammar AS DWORD
 , BYREF ppvEngineGrammarContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnDeleteGrammar ( ' VTable offset = 32
 BYVAL pvEngineGrammar AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD LoadProprietaryGrammar ( ' VTable offset = 36
 BYVAL pvEngineGrammar AS DWORD
 , BYREF rguidParam AS GUID
 , BYREF pszStringParam AS WSTRINGZ
 , BYVAL pvDataParam AS DWORD
 , BYVAL ulDataSize AS DWORD
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD UnloadProprietaryGrammar ( ' VTable offset = 40
 BYVAL pvEngineGrammar AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetProprietaryRuleState ( ' VTable offset = 44
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pszName AS WSTRINGZ
 , BYVAL pReserved AS DWORD
 , BYVAL NewState AS LONG
 , BYREF pcRulesChanged AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetProprietaryRuleIdState ( ' VTable offset = 48
 BYVAL pvEngineGrammar AS DWORD
 , BYVAL dwRuleId AS DWORD
 , BYVAL NewState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LoadSLM ( ' VTable offset = 52
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pszTopicName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD UnloadSLM ( ' VTable offset = 56
 BYVAL pvEngineGrammar AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSLMState ( ' VTable offset = 60
 BYVAL pvEngineGrammar AS DWORD
 , BYVAL NewState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetWordSequenceData ( ' VTable offset = 64
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pText AS WSTRINGZ
 , BYVAL cchText AS DWORD
 , BYREF pInfo AS SPTEXTSELECTIONINFO
 ) AS LONG
 ' =====================================================================================
 METHOD SetTextSelection ( ' VTable offset = 68
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pInfo AS SPTEXTSELECTIONINFO
 ) AS LONG
 ' =====================================================================================
 METHOD IsPronounceable ( ' VTable offset = 72
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pszWord AS WSTRINGZ
 , BYREF pWordPronounceable AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD OnCreateRecoContext ( ' VTable offset = 76
 BYVAL hSAPIRecoContext AS DWORD
 , BYREF ppvEngineContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnDeleteRecoContext ( ' VTable offset = 80
 BYVAL pvEngineContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD PrivateCall ( ' VTable offset = 84
 BYVAL pvEngineContext AS DWORD
 , BYVAL pCallFrame AS DWORD
 , BYVAL ulCallFrameSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetAdaptationData ( ' VTable offset = 88
 BYVAL pvEngineContext AS DWORD
 , BYREF pAdaptationData AS WSTRINGZ
 , BYVAL cch AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetPropertyNum ( ' VTable offset = 92
 BYVAL eSrc AS LONG
 , BYVAL pvSrcObj AS DWORD
 , BYREF pName AS WSTRINGZ
 , BYVAL lValue AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyNum ( ' VTable offset = 96
 BYVAL eSrc AS LONG
 , BYVAL pvSrcObj AS DWORD
 , BYREF pName AS WSTRINGZ
 , BYREF lValue AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetPropertyString ( ' VTable offset = 100
 BYVAL eSrc AS LONG
 , BYVAL pvSrcObj AS DWORD
 , BYREF pName AS WSTRINGZ
 , BYREF pValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyString ( ' VTable offset = 104
 BYVAL eSrc AS LONG
 , BYVAL pvSrcObj AS DWORD
 , BYREF pName AS WSTRINGZ
 , BYREF ppCoMemValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetGrammarState ( ' VTable offset = 108
 BYVAL pvEngineGrammar AS DWORD
 , BYVAL eGrammarState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD WordNotify ( ' VTable offset = 112
 BYVAL Action AS LONG
 , BYVAL cWords AS DWORD
 , BYREF pWords AS SPWORDENTRY
 ) AS LONG
 ' =====================================================================================
 METHOD RuleNotify ( ' VTable offset = 116
 BYVAL Action AS LONG
 , BYVAL cRules AS DWORD
 , BYREF pRules AS SPRULEENTRY
 ) AS LONG
 ' =====================================================================================
 METHOD PrivateCallEx ( ' VTable offset = 120
 BYVAL pvEngineContext AS DWORD
 , BYVAL pInCallFrame AS DWORD
 , BYVAL ulInCallFrameSize AS DWORD
 , BYREF ppvCoMemResponse AS DWORD
 , BYREF pulResponseSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetContextState ( ' VTable offset = 124
 BYVAL pvEngineContext AS DWORD
 , BYVAL eContextState AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpSREngine_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpSREngine2
' IID = {7BA627D8-33F9-4375-90C5-9985AEE5EDE5}
' Inherited interface = ISpSREngine
' ########################################################################################
#IF NOT %DEF(%ISpSREngine2_INTERFACE_DEFINED)
 %ISpSREngine2_INTERFACE_DEFINED = 1
INTERFACE ISpSREngine2 $IID_ISpSREngine2
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpSREngine methods
 ' =====================================================================================
 METHOD SetSite ( ' VTable offset = 12
 BYVAL pSite AS ISpSREngineSite
 ) AS LONG
 ' =====================================================================================
 METHOD GetInputAudioFormat ( ' VTable offset = 16
 BYREF pguidSourceFormatId AS GUID
 , BYREF pSourceWaveFormatEx AS WAVEFORMATEX
 , BYREF pguidDesiredFormatId AS GUID
 , BYREF ppCoMemDesiredWaveFormatEx AS WAVEFORMATEX
 ) AS LONG
 ' =====================================================================================
 METHOD RecognizeStream ( ' VTable offset = 20
 BYREF rguidFmtId AS GUID
 , BYREF pWaveFormatEx AS WAVEFORMATEX
 , BYVAL hRequestSync AS DWORD
 , BYVAL hDataAvailable AS DWORD
 , BYVAL hExit AS DWORD
 , BYVAL fNewAudioStream AS LONG
 , BYVAL fRealTimeAudio AS LONG
 , BYVAL pAudioObjectToken AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD SetRecoProfile ( ' VTable offset = 24
 BYVAL pProfile AS ISpObjectToken
 ) AS LONG
 ' =====================================================================================
 METHOD OnCreateGrammar ( ' VTable offset = 28
 BYVAL pvEngineRecoContext AS DWORD
 , BYVAL hSAPIGrammar AS DWORD
 , BYREF ppvEngineGrammarContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnDeleteGrammar ( ' VTable offset = 32
 BYVAL pvEngineGrammar AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD LoadProprietaryGrammar ( ' VTable offset = 36
 BYVAL pvEngineGrammar AS DWORD
 , BYREF rguidParam AS GUID
 , BYREF pszStringParam AS WSTRINGZ
 , BYVAL pvDataParam AS DWORD
 , BYVAL ulDataSize AS DWORD
 , BYVAL Options AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD UnloadProprietaryGrammar ( ' VTable offset = 40
 BYVAL pvEngineGrammar AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetProprietaryRuleState ( ' VTable offset = 44
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pszName AS WSTRINGZ
 , BYVAL pReserved AS DWORD
 , BYVAL NewState AS LONG
 , BYREF pcRulesChanged AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetProprietaryRuleIdState ( ' VTable offset = 48
 BYVAL pvEngineGrammar AS DWORD
 , BYVAL dwRuleId AS DWORD
 , BYVAL NewState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LoadSLM ( ' VTable offset = 52
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pszTopicName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD UnloadSLM ( ' VTable offset = 56
 BYVAL pvEngineGrammar AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSLMState ( ' VTable offset = 60
 BYVAL pvEngineGrammar AS DWORD
 , BYVAL NewState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetWordSequenceData ( ' VTable offset = 64
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pText AS WSTRINGZ
 , BYVAL cchText AS DWORD
 , BYREF pInfo AS SPTEXTSELECTIONINFO
 ) AS LONG
 ' =====================================================================================
 METHOD SetTextSelection ( ' VTable offset = 68
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pInfo AS SPTEXTSELECTIONINFO
 ) AS LONG
 ' =====================================================================================
 METHOD IsPronounceable ( ' VTable offset = 72
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pszWord AS WSTRINGZ
 , BYREF pWordPronounceable AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD OnCreateRecoContext ( ' VTable offset = 76
 BYVAL hSAPIRecoContext AS DWORD
 , BYREF ppvEngineContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnDeleteRecoContext ( ' VTable offset = 80
 BYVAL pvEngineContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD PrivateCall ( ' VTable offset = 84
 BYVAL pvEngineContext AS DWORD
 , BYVAL pCallFrame AS DWORD
 , BYVAL ulCallFrameSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetAdaptationData ( ' VTable offset = 88
 BYVAL pvEngineContext AS DWORD
 , BYREF pAdaptationData AS WSTRINGZ
 , BYVAL cch AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetPropertyNum ( ' VTable offset = 92
 BYVAL eSrc AS LONG
 , BYVAL pvSrcObj AS DWORD
 , BYREF pName AS WSTRINGZ
 , BYVAL lValue AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyNum ( ' VTable offset = 96
 BYVAL eSrc AS LONG
 , BYVAL pvSrcObj AS DWORD
 , BYREF pName AS WSTRINGZ
 , BYREF lValue AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetPropertyString ( ' VTable offset = 100
 BYVAL eSrc AS LONG
 , BYVAL pvSrcObj AS DWORD
 , BYREF pName AS WSTRINGZ
 , BYREF pValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyString ( ' VTable offset = 104
 BYVAL eSrc AS LONG
 , BYVAL pvSrcObj AS DWORD
 , BYREF pName AS WSTRINGZ
 , BYREF ppCoMemValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetGrammarState ( ' VTable offset = 108
 BYVAL pvEngineGrammar AS DWORD
 , BYVAL eGrammarState AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD WordNotify ( ' VTable offset = 112
 BYVAL Action AS LONG
 , BYVAL cWords AS DWORD
 , BYREF pWords AS SPWORDENTRY
 ) AS LONG
 ' =====================================================================================
 METHOD RuleNotify ( ' VTable offset = 116
 BYVAL Action AS LONG
 , BYVAL cRules AS DWORD
 , BYREF pRules AS SPRULEENTRY
 ) AS LONG
 ' =====================================================================================
 METHOD PrivateCallEx ( ' VTable offset = 120
 BYVAL pvEngineContext AS DWORD
 , BYVAL pInCallFrame AS DWORD
 , BYVAL ulInCallFrameSize AS DWORD
 , BYREF ppvCoMemResponse AS DWORD
 , BYREF pulResponseSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetContextState ( ' VTable offset = 124
 BYVAL pvEngineContext AS DWORD
 , BYVAL eContextState AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpSREngine2 methods
 ' =====================================================================================
 METHOD PrivateCallImmediate ( ' VTable offset = 128
 BYVAL pvEngineContext AS DWORD
 , BYVAL pInCallFrame AS DWORD
 , BYVAL v AS DWORD
 , BYREF ppvCoMemResponse AS DWORD
 , BYREF pulResponseSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetAdaptationData2 ( ' VTable offset = 132
 BYVAL pvEngineContext AS DWORD
 , BYREF pAdaptationData AS WSTRINGZ
 , BYVAL cch AS DWORD
 , BYREF pTopicName AS WSTRINGZ
 , BYVAL eSettings AS LONG
 , BYVAL eRelevance AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetGrammarPrefix ( ' VTable offset = 136
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pszPrefix AS WSTRINGZ
 , BYVAL fIsPrefixRequired AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetRulePriority ( ' VTable offset = 140
 BYVAL hRule AS DWORD
 , BYVAL pvClientRuleContext AS DWORD
 , BYVAL nRulePriority AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD EmulateRecognition ( ' VTable offset = 144
 BYVAL pPhrase AS ISpPhrase
 , BYVAL dwCompareFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSLMWeight ( ' VTable offset = 148
 BYVAL pvEngineGrammar AS DWORD
 , BYVAL flWeight AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetRuleWeight ( ' VTable offset = 152
 BYVAL hRule AS DWORD
 , BYVAL pvClientRuleContext AS DWORD
 , BYVAL flWeight AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetTrainingState ( ' VTable offset = 156
 BYVAL fDoingTraining AS LONG
 , BYVAL fAdaptFromTrainingData AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD ResetAcousticModelAdaptation ( ' VTable offset = 160
 ) AS LONG
 ' =====================================================================================
 METHOD OnLoadCFG ( ' VTable offset = 164
 BYVAL pvEngineGrammar AS DWORD
 , BYREF pGrammarData AS SPBINARYGRAMMAR
 , BYVAL ulGrammarID AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnUnloadCFG ( ' VTable offset = 168
 BYVAL pvEngineGrammar AS DWORD
 , BYVAL ulGrammarID AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpSREngine2_INTERFACE_DEFINED__ */
' // Size = 28 bytes
TYPE SPPHRASEALTREQUEST DWORD
 ulStartElement AS DWORD ' ULONG
 cElements AS DWORD ' ULONG
 ulRequestAltCount AS DWORD ' ULONG
 pvResultExtra AS DWORD ' void *
 cbResultExtra AS DWORD ' ULONG
 pPhrase AS DWORD PTR ' ISpPhrase *
 pRecoContext AS DWORD PTR ' ISpRecoContext *
END TYPE
' ########################################################################################
' Interface name = ISpSRAlternates
' IID = {FECE8294-2BE1-408F-8E68-2DE377092F0E}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpSRAlternates_INTERFACE_DEFINED)
 %ISpSRAlternates_INTERFACE_DEFINED = 1
INTERFACE ISpSRAlternates $IID_ISpSRAlternates
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetAlternates ( ' VTable offset = 12
 BYREF pAltRequest AS SPPHRASEALTREQUEST
 , BYREF ppAlts AS SPPHRASEALT
 , BYREF pcAlts AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 16
 BYREF pAltRequest AS SPPHRASEALTREQUEST
 , BYREF pAlt AS SPPHRASEALT
 , BYREF ppvResultExtra AS DWORD
 , BYREF pcbResultExtra AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpSRAlternates_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ISpSRAlternates2
' IID = {F338F437-CB33-4020-9CAB-C71FF9CE12D3}
' Inherited interface = ISpSRAlternates
' ########################################################################################
#IF NOT %DEF(%ISpSRAlternates2_INTERFACE_DEFINED)
 %ISpSRAlternates2_INTERFACE_DEFINED = 1
INTERFACE ISpSRAlternates2 $IID_ISpSRAlternates2
 INHERIT IUnknown
 ' =====================================================================================
 ' ISpSRAlternates methods
 ' =====================================================================================
 METHOD GetAlternates ( ' VTable offset = 12
 BYREF pAltRequest AS SPPHRASEALTREQUEST
 , BYREF ppAlts AS SPPHRASEALT
 , BYREF pcAlts AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 16
 BYREF pAltRequest AS SPPHRASEALTREQUEST
 , BYREF pAlt AS SPPHRASEALT
 , BYREF ppvResultExtra AS DWORD
 , BYREF pcbResultExtra AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ISpSRAlternates2 methods
 ' =====================================================================================
 METHOD CommitText ( ' VTable offset = 20
 BYREF pAltRequest AS SPPHRASEALTREQUEST
 , BYREF pcszNewText AS WSTRINGZ
 , BYVAL commitFlags AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISpSRAlternates2_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = _ISpPrivateEngineCall
' IID = {8E7C791E-4467-11D3-9723-00C04F72DB08}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpPrivateEngineCall_INTERFACE_DEFINED)
 %ISpPrivateEngineCall_INTERFACE_DEFINED = 1
INTERFACE ISpPrivateEngineCall $IID__ISpPrivateEngineCall
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CallEngine ( ' VTable offset = 12
 BYVAL pCallFrame AS DWORD
 , BYVAL ulCallFrameSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CallEngineEx ( ' VTable offset = 16
 BYVAL pInFrame AS DWORD
 , BYVAL ulInFrameSize AS DWORD
 , BYREF ppCoMemOutFrame AS DWORD
 , BYREF pulOutFrameSize AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* ___ISpPrivateEngineCall_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = _ISpPrivateEngineCallEx
' IID = {DEFD682A-FE0A-42B9-BFA1-56D3D6CECFAF}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISpPrivateEngineCallEx_INTERFACE_DEFINED)
 %ISpPrivateEngineCallEx_INTERFACE_DEFINED = 1
INTERFACE ISpPrivateEngineCallEx $IID__ISpPrivateEngineCallEx
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CallEngineSynchronize ( ' VTable offset = 12
 BYVAL pInFrame AS DWORD
 , BYVAL ulInFrameSize AS DWORD
 , BYREF ppCoMemOutFrame AS DWORD
 , BYREF pulOutFrameSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CallEngineImmediate ( ' VTable offset = 16
 BYVAL pInFrame AS DWORD
 , BYVAL ulInFrameSize AS DWORD
 , BYREF ppCoMemOutFrame AS DWORD
 , BYREF pulOutFrameSize AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* ___ISpPrivateEngineCallEx_INTERFACE_DEFINED__ */
'#include "sapiddk51.h"
#ENDIF
