fix: Fix TTS COM exception in IL2CPP
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SpeechLib {
|
||||
[ComImport]
|
||||
[TypeLibType(4160)]
|
||||
[Guid("C74A3ADC-B727-4500-A84A-B526721C8B8C")]
|
||||
public interface ISpeechObjectToken {
|
||||
[DispId(1)]
|
||||
string Id {
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(2)]
|
||||
ISpeechDataKey DataKey {
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(2)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(3)]
|
||||
SpObjectTokenCategory Category {
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(3)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(4)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
string GetDescription([In] int Locale = 0);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(5)]
|
||||
[TypeLibFunc(64)]
|
||||
void SetId([In][MarshalAs(UnmanagedType.BStr)] string Id, [In][MarshalAs(UnmanagedType.BStr)] string CategoryID = "", [In] bool CreateIfNotExist = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(6)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
string GetAttribute([In][MarshalAs(UnmanagedType.BStr)] string AttributeName);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(7)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
object CreateInstance([Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In] SpeechTokenContext ClsContext = SpeechTokenContext.STCAll);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(8)]
|
||||
void Remove([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(9)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
string GetStorageFileName([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID, [In][MarshalAs(UnmanagedType.BStr)] string KeyName, [In][MarshalAs(UnmanagedType.BStr)] string FileName, [In] SpeechTokenShellFolder Folder);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(10)]
|
||||
[TypeLibFunc(64)]
|
||||
void RemoveStorageFileName([In][MarshalAs(UnmanagedType.BStr)] string ObjectStorageCLSID, [In][MarshalAs(UnmanagedType.BStr)] string KeyName, [In] bool DeleteFile);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(11)]
|
||||
[TypeLibFunc(64)]
|
||||
bool IsUISupported([In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData, [Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object Object);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(12)]
|
||||
[TypeLibFunc(64)]
|
||||
void DisplayUI([In] int hWnd, [In][MarshalAs(UnmanagedType.BStr)] string Title, [In][MarshalAs(UnmanagedType.BStr)] string TypeOfUI, [Optional][In][MarshalAs(UnmanagedType.Struct)] ref object ExtraData, [Optional][In][IUnknownConstant][MarshalAs(UnmanagedType.IUnknown)] object Object);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(13)]
|
||||
bool MatchesAttributes([In][MarshalAs(UnmanagedType.BStr)] string Attributes);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user