简体   繁体   中英

Text Services Framework Application

I can find tons of examples on how to make a Text Services Framework Service but not one on how to make an app that uses it actually. While I'm trying to do this in C# I'm getting despite enough to even use C++ examples if that's all I can get!

I wrote an article for MSDN magazine that talks about writing TSF text stores, and there are a couple of samples in the Windows 7 SDK that implement ITextStoreACP . You may also find this implementation interesting as well.

Windows 8 modern apps should implement ITextStoreACP2 instead; the changes are relatively minor.

Part of the difficulty of writing a sample for ITextStoreACP is that you need some sort of document already, which tends to make the samples overly complicated.

All the examples I know of are in C++. Text stores (unlike text services) can be written in C# without any performance issues.

Someone (@copyliu) created a C#-based TextService ( https://github.com/copyliu/YIME ) example. I have had some success experimenting with this codebase and managed to make it work on normal Desktop apps on Windows 10.

However, I have some issues with using the .NET based TextService COM object in an UWP environment, ie the CLR (not the CLR that UWP is running on, but the CLR instance used by the C# TextService) seems to have failed to bootstrap. See: CLR cannot create .NET-based COM objects in UWP

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM