dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Error loading type library

  1. #1
    Join Date
    Jan 2001
    Location
    Ottawa, Canada
    Posts
    152

    Error loading type library

    I am trying to use .NET component from VC 6.0 MFC application.
    Basically I am trying to call managed component from unmanaged
    code.

    I did created tlb file for .NET assembly by using Tlbexp.exe utility and import it in my MFC application as follows:

    #import "C:\NET\MyAssembly.tlb" raw_interfaces_only



    However when I try to compile the MFC app I get the following error:

    C:\Temp\LegacyDlgDlg.cpp(9) : fatal error C1084: Cannot read type library file: 'C:\NET\\MyAssembly.tlb': Error loading type library/DLL.

    Can anyone explain what might went wrong in this case?
    Thanks

  2. #2
    Join Date
    Mar 2004
    Posts
    8

    Re: Error loading type library

    this is late to reply, but I post it anyway for those of you who still have the same problem. I imported a dll and got a similar problem, but I have error C4772 before C1084. The main reason is that the type liberary was not registered properly. Regsvr32.exe only registers the dll, not the type liberaries refered to in the dll. Run regtlib.exe or use a thirdparty utility to register the type lib. You can find a nice utility at: http://www.vbaccelerator.com/home/VB...ty/article.asp

    Good luck

  3. #3
    Join Date
    Mar 2007
    Posts
    1

    Re: Error loading type library

    This same error happened to me yesterday. I did the following steps and the error went away:

    (1) Uninstall MS .NET Framework 1.1
    (2) Reinstall MS .NET Framework 1.1 by downloading ".NET Framework Version 1.1 Redistributable Package"
    (3) Download the security update for .NET Framework 1.1
    (4) Download "Microsoft .NET Framework 1.1 Service Pack 1"
    (5) Dwonload the security update for Service Pack 1

    Please note that the error would still exist if step (4) is not done.


    Good Luck!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)