Search

The 6.0A SDK is missing RichEd20.lib for x64 by cradke

Closed
as By Design Help for as By Design

2
0
Sign in
to vote
Type: Bug
ID: 551071
Opened: 4/14/2010 9:54:58 AM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
Including RichEd20.lib to resolve the CreateTextServices fails for x64 builds with a "cannot open file 'RichEd20.lib'" error. Additionally, IID_ITextHost is unresolved.

How is the CreateTextServices function supposed be resolved for x64 builds?

Details (expand)

Product Language

English

Version

Visual Studio 2008 SP1

Operating System

Windows 7

Operating System Language

English

Steps to Reproduce

Create a native C++ project and add a call to CreateTextServices. Build for win32, notice you must include RichEd20.dll to resolve the CreateTextServices function. Added RichEd20.lib to the Linker - Additional Dependencies setting for All Platforms. Build win32 again, all is well. Now build for x64, notice the cannot open file 'RichEd20.lib' error. Go to your Microsoft SDKs\Windows\v6.0A\Lib\x64 notice the file is indeed not there.

Actual Results

LINK : fatal error LNK1104: cannot open file 'RichEd20.lib'

Expected Results

========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey.

 

Sign in to post a comment.
Posted by Microsoft on 6/4/2010 at 3:54 PM
Further information about how to get this to work:

void CreateRichEdit(ITextHost *pTextHost, IUnknown **ppUnk)
{
    TextServicesProcType TextServicesProc;
    HMODULE hmod = LoadLibrary("msftedit.dll");
    if (hmod) TextServicesProc = (TextServicesProcType)GetProcAddress(hmod, "CreateTextServices");
    if (TextServicesProc)
    {
        HRESULT hr = TextServicesProc(NULL, pTextHost, ppUnk);
    }
}

Thanks,
Chris
Posted by Microsoft on 6/3/2010 at 4:23 PM
Hi Cradke,
I spoke with the developer and he indicates there isn't a 64-bit version of riched20.lib. He indicates that loadlibrary should be used as described here: http://msdn.microsoft.com/en-us/library/bb787873(VS.85).aspx, which eliminates the need to import the lib.

If there are any further issues, please contact me chrishu at microsoft dot com.

Thanks,
Chris Hubbard
Windows C++ SDET
Posted by Microsoft on 4/17/2010 at 2:56 AM
Thanks for your feedback. We were able to reproduce the issue you are seeing. We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by cradke on 4/16/2010 at 4:20 PM
I attached a example app that makes a call to CreateTextServices in the WinMain. Notice that the Win32 platforms build without error, however changing the platform to x64 results in the reported error.
Posted by Microsoft on 4/15/2010 at 1:00 AM

Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Could you please attach a zipped example project file to this feedback through our site to help us reproduce the issue?

Thanks again for your efforts and we look forward to hearing from you.
Visual Studio Product Team
Sign in to post a workaround.