Winapi Win32:CreateTextServices出错

Winapi Win32:CreateTextServices出错,winapi,linker,richedit,Winapi,Linker,Richedit,我正在尝试使用TextServ.h中的CreateTextServices函数。似乎我必须将riched20.lib链接到project才能使用此功能。 但是当我将riched20.lib添加到链接器/输入/其他依赖项时,与说错误LNK1181:无法打开输入文件“riched20.lib”相比 如何修复此错误? 我使用的是VS 2013,Win 8.1 32位。也有同样的问题。我认为最新版本的richedit/msftedit没有可用的lib,但是textserv.h提供了函数的定义,因此您不需

我正在尝试使用
TextServ.h
中的
CreateTextServices
函数。似乎我必须将
riched20.lib
链接到project才能使用此功能。
但是当我将
riched20.lib
添加到链接器/输入/其他依赖项时,与说错误LNK1181:无法打开输入文件“riched20.lib”相比
如何修复此错误?

我使用的是VS 2013,Win 8.1 32位。

也有同样的问题。我认为最新版本的richedit/msftedit没有可用的lib,但是textserv.h提供了函数的定义,因此您不需要额外的.lib就可以执行以下操作:

// load the dll and get the function address
// PCreateTextServices is declared in textserv.h:
HMODULE h = LoadLibrary(L"msftedit.dll");
PCreateTextServices createTextServices = (PCreateTextServices)GetProcAddress(h, "CreateTextServices");
...

ITextServices svc*;
int hr = createTextServices(NULL, host, (IUnknown**)&svc);

...
svc->Release();
FreeLibrary(h);

错误信息非常清楚。lib文件在哪里?你能找到它吗?@DavidHeffernan:看来(我认为)win8.1没有那个自由。我在codeproject.com下载的所有项目都有相同的问题。Win 8.1不提供lib文件。它们与SDK一起提供。我认为您可能会对lib文件实际上是什么感到困惑。