using System; using System.Runtime.InteropServices; namespace Vanara.PInvoke { public static partial class Imm32 { /// Provides access to the list of IME plug-in dictionaries. /// /// This interface is implemented in classes of ProgID="ImePlugInDictDictionaryList1041" for Microsoft Japanese IME and /// ProgID="ImePlugInDictDictionaryList2052" for Microsoft Simplified Chinese IME. /// // https://docs.microsoft.com/en-us/windows/win32/api/msimeapi/nn-msimeapi-iimeplugindictdictionarylist [PInvokeData("msimeapi.h", MSDNShortId = "NN:msimeapi.IImePlugInDictDictionaryList")] [ComImport, Guid("98752974-b0a6-489b-8f6f-bff3769c8eeb"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IImePlugInDictDictionaryList { /// /// Obtains the list of Dictionary IDs ( GUID) of the IME plug-in dictionaries which are in use by IME, with their /// creation dates and encryption flags. /// /// /// Array of the dictionary IDs ( GUID) of the IME plug-in dictionaries which are in use by IME. /// /// Array of the dates of creation for each of the IME plug-in dictionaries returned by prgDictionaryGUID. /// /// Array of flags indicating whether each dictionary is encrypted or not for each of the IME plug-in dictionaries returned by prgDictionaryGUID. /// /// /// This method can return one of these values. /// /// /// Return code /// Description /// /// /// S_OK /// Succeeded. /// /// /// E_OUTOFMEMORY /// Out of memory. /// /// /// E_FAIL /// Other errors. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/msimeapi/nf-msimeapi-iimeplugindictdictionarylist-getdictionariesinuse // HRESULT GetDictionariesInUse( [out] SAFEARRAY **prgDictionaryGUID, [in, out] SAFEARRAY **prgDateCreated, [in, out] SAFEARRAY // **prgfEncrypted ); void GetDictionariesInUse([MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] out string[] prgDictionaryGUID, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_DATE)] out DateTime[] prgDateCreated, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_I4)] out int[] prgfEncrypted); /// Deletes a dictionary from the IME's plug-in dictionary list. /// The dictionary ID ( GUID) of the dictionary to be removed from the list. /// /// This method can return one of these values. /// /// /// Return code /// Description /// /// /// S_OK /// The specified dictionary existed in the list and was successfully removed. /// /// /// S_FALSE /// The specified dictionary does not exist in the list. /// /// /// E_FAIL /// Other errors. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/msimeapi/nf-msimeapi-iimeplugindictdictionarylist-deletedictionary HRESULT // DeleteDictionary( [in] BSTR bstrDictionaryGUID ); [PreserveSig] HRESULT DeleteDictionary([MarshalAs(UnmanagedType.BStr)] string bstrDictionaryGUID); } /// CLSID_ImePlugInDictDictionaryList_JPN [PInvokeData("msimeapi.h")] [ComImport, Guid("4FE2776B-B0F9-4396-B5FC-E9D4CF1EC195"), ClassInterface(ClassInterfaceType.None)] public class ImePlugInDictDictionaryList1041 { } /// CLSID_ImePlugInDictDictionaryList_CHS [PInvokeData("msimeapi.h")] [ComImport, Guid("7BF0129B-5BEF-4DE4-9B0B-5EDB66AC2FA6"), ClassInterface(ClassInterfaceType.None)] public class ImePlugInDictDictionaryList2052 { } } }