我先后装了Visual C++ 和MSDN Library (July 2005). 请问如何正确关联VC和MSDN?
也就是在VC中按F1正确跳转到NSDN library.

解决方案 »

  1.   

    我已经试过tools->help system, 一样地弹出对话框,“MSDN Collection doesn't exit. please reinstall MSDN'. 
    没有其它办法,是不是要修改某个registry键值啊?
      

  2.   

    VC6? 最后一个支持VC6的MSDN是,2001年10月的,或者是2000年10月。
      

  3.   

    不支持的
    我的也和楼主一样
    当时我把注册表和tools->help system都统统试了几次,都失败了
    最后只能单独使用MSDN了
    要不你就装配套的MSDN
      

  4.   

    我装了vs2003的msdn,后缀是.hxs ,.hxt,.hxi的,怎么才能打开他们啊
      

  5.   

    我装了MSDN后也没做任何工作,在VC++6.0中遇到相查询的双击选中后再按F1就自动跳到相关的内容了呀,没有遇到你那种情况!
      

  6.   

    MSDN 2005是VISUAL STUDIO.net的
    VC6的要用2001年10最后版的才能关联
      

  7.   

    关联了又怎么样 新的msdn又不支持vs6
      

  8.   

    MSDN 2001 oct 1DVD英文完整版 bt高速下载
    我找了一个星期,终于找到这个版本了,lol,
    共享一下,bt下载,速度还不错,种子很稳定
    http://bbs.btchina.net/showthread.php?threadid=713857
      

  9.   

    VS6-MSDN下载地址如下:
    http://howard.whxr.com/FILES/VS6MSDN
      

  10.   

    2002年3月VS.NET正式发布,从那之后推出的MSDN都无法支持VS6.0。
    楼主要找2001年或者以前发布的MSDN,安装后会自动关联的。
      

  11.   

    Introduction
    After Oct. 2001, you cannot get help by pressing F1 in VC6 with latest MSDN. Microsoft has changed the help format from CHM to document explorer.Is it possible to use the latest MSDN in VC6? 
    The answer is YES! 
    Details
    First, we must know how VC6 brings up the help after you press F1. This is easy if you have a debugger such as Soft-ICE.If you don't install MSDN, after you press F1, VC6 will popup a message box which says you haven't installed MSDN. Set a breakpoint at MessageBox. Press F1 and the debugger will popup. Look at the stack. You will see this function was called from "C:\Program Files\Common Files\Microsoft Shared\VS98\vshelp.dll".Then we use Dependency Walker ("depends" in Visual Studio Tools) to see what functions are exported. We will see DllRegisterServer and DllUnregisterServer. It's obviously a COM.Use VC6 to create a simple console project. Add the following line to your .cpp file.#import "C:\Program Files\Common Files\Microsoft Shared\VS98\vshelp.dll"
    And build your project. Open the Debug directory, and you will find "vshelp.tlh" and "vshelp.tli". Open "vshelp.tlh", you will see:struct __declspec(uuid("854d7ac0-bc3d-11d0-b421-00a0c90f9dc4"))
        IVsHelpSystem : IUnknown
    {
        //
        // Wrapper methods for error-handling
        //    HRESULT KeywordSearch (
            LPWSTR pszKeyword,
            long dwFlags,
            long dwReserved );
        HRESULT ALinkSearch (
            LPWSTR pszALink,
            long dwFlags,
            long dwReserved );
        ...
    The function KeywordSearch was called when you press F1. So if we replace this function and call the latest MSDN's help function, it should work.Then how to do this? Since it's a COM interface, it's easy to hook it.Basically a COM interface is a C++ class with a virtual table. It has a pointer to a table that contains the address of all virtual functions. And this table is shared by all instances. So we only need to change the function address in the table. And this interface will look like:struct _IVsHelpSystemVtbl{
        HRESULT (STDMETHODCALLTYPE *QueryInterface)(IUnknown * This, 
          REFIID riid, void **ppvObject);
        ULONG (STDMETHODCALLTYPE *AddRef)(IUnknown * This);
        ULONG (STDMETHODCALLTYPE *Release)(IUnknown * This);
        HRESULT (STDMETHODCALLTYPE *KeywordSearch)(IUnknown * This, 
          LPWSTR pszKeyword, long dwFlags, long dwReserved);
    };struct _IVsHelpSystem
    {
        struct _IVsHelpSystemVtbl *lpVtbl;
    };
    What we need to do now is create an instance of this COM. And we will get the address of the table. Now we need to know how to bring up the help of the latest MSDN. It seems it's not documented. It's also a COM.Add the following line to your .cpp file. You will get the COM definition.#import "C:\Program Files\Common Files\Microsoft Shared\MSEnv\vshelp.tlb"
    In "vshelp.tlh", you can find function:HRESULT DisplayTopicFromF1Keyword ( _bstr_t pszKeyword );
    Obviously, this is what we need. So in the function KeywordSearch, call DisplayTopicFromF1Keyword which will launch the latest MSDN.Here is the code to hook the function KeywordSearch:HRESULT hr = theHelp.CreateInstance(__uuidof(VsHelp::DExploreAppObj));
    if (SUCCEEDED(hr))
    {
        HRESULT hr = vc6Help.CreateInstance(
          __uuidof(VsHelpServices::VsHelpServices));
        if (SUCCEEDED(hr))
        {
            iHelp = (_IVsHelpSystem *)vc6Help.GetInterfacePtr();        TRACE1("iHelp = %x\n", iHelp);
            TRACE1("lpVtbl = %x\n", iHelp->lpVtbl);
            TRACE1("KeywordSearch = %x\n", iHelp->lpVtbl->KeywordSearch);        OldKeywordSearch = iHelp->lpVtbl->KeywordSearch;        DWORD dwOldProtect;
            if (VirtualProtect(iHelp->lpVtbl, sizeof(
              _IVsHelpSystemVtbl), PAGE_READWRITE, &dwOldProtect))
                iHelp->lpVtbl->KeywordSearch = MyKeywordSearch;
        }
    }
      

  12.   

    我实现 了。
    mail to me: [email protected]
      

  13.   

    谢谢 vcin(天上下雨地上流)