107 lines
5.8 KiB
C#
107 lines
5.8 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace SpeechLib {
|
|
[ComImport]
|
|
[Guid("CA7EAC50-2D01-4145-86D4-5AE7D70F4469")]
|
|
[CoClass(typeof(SpObjectTokenCategoryClass))]
|
|
public interface SpObjectTokenCategory : ISpeechObjectTokenCategory { }
|
|
|
|
[ComImport]
|
|
[ClassInterface((ClassInterfaceType)0)]
|
|
[Guid("A910187F-0C7A-45AC-92CC-59EDAFB77B53")]
|
|
[TypeLibType(2)]
|
|
public class SpObjectTokenCategoryClass : ISpeechObjectTokenCategory, SpObjectTokenCategory, ISpObjectTokenCategory {
|
|
[DispId(1)]
|
|
public virtual extern string Id {
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
[DispId(1)]
|
|
[return: MarshalAs(UnmanagedType.BStr)]
|
|
get;
|
|
}
|
|
|
|
[DispId(2)]
|
|
public virtual extern string Default {
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
[DispId(2)]
|
|
[return: MarshalAs(UnmanagedType.BStr)]
|
|
get;
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
[DispId(2)]
|
|
[param: In]
|
|
[param: MarshalAs(UnmanagedType.BStr)]
|
|
set;
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
[DispId(3)]
|
|
public virtual extern void SetId([In][MarshalAs(UnmanagedType.BStr)] string Id, [In] bool CreateIfNotExist = false);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
[DispId(4)]
|
|
[TypeLibFunc(64)]
|
|
[return: MarshalAs(UnmanagedType.Interface)]
|
|
public virtual extern ISpeechDataKey GetDataKey([In] SpeechDataKeyLocation Location = SpeechDataKeyLocation.SDKLDefaultLocation);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
[DispId(5)]
|
|
[return: MarshalAs(UnmanagedType.Interface)]
|
|
public virtual extern ISpeechObjectTokens EnumerateTokens([In][MarshalAs(UnmanagedType.BStr)] string RequiredAttributes = "", [In][MarshalAs(UnmanagedType.BStr)] string OptionalAttributes = "");
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void SetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint cbData, [In] ref byte pData);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void GetData([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] ref uint pcbData, out byte pData);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void SetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In][MarshalAs(UnmanagedType.LPWStr)] string pszValue);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void GetStringValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValue);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void SetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, [In] uint dwValue);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void GetDWORD([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName, out uint pdwValue);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void OpenKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKeyName, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void CreateKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppSubKey);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void DeleteKey([In][MarshalAs(UnmanagedType.LPWStr)] string pszSubKey);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void DeleteValue([In][MarshalAs(UnmanagedType.LPWStr)] string pszValueName);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void EnumKeys([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszSubKeyName);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void EnumValues([In] uint Index, [MarshalAs(UnmanagedType.LPWStr)] out string ppszValueName);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void SetId([In][MarshalAs(UnmanagedType.LPWStr)] string pszCategoryId, [In] int fCreateIfNotExist);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void GetId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemCategoryId);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void GetDataKey([In] SPDATAKEYLOCATION spdkl, [MarshalAs(UnmanagedType.Interface)] out ISpDataKey ppDataKey);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void EnumTokens([In][MarshalAs(UnmanagedType.LPWStr)] string pzsReqAttribs, [In][MarshalAs(UnmanagedType.LPWStr)] string pszOptAttribs, [MarshalAs(UnmanagedType.Interface)] out SpMMAudioEnum ppEnum);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void SetDefaultTokenId([In][MarshalAs(UnmanagedType.LPWStr)] string pszTokenId);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
public virtual extern void GetDefaultTokenId([MarshalAs(UnmanagedType.LPWStr)] out string ppszCoMemTokenId);
|
|
}
|
|
}
|