Menu

#704 Heat throws "Bad Image" error on typelibs.

v3.0
closed
heat (135)
2012-09-15
2006-10-24
No

Not sure why but all the TLB files (created
internally) which are harvested by heat all throw
a "Bad Image" error.

Version: 3.0.2218.0

Discussion

  • Anthony Valente

    Anthony Valente - 2006-10-24

    Bad Image screenshot

     
  • Anthony Valente

    Anthony Valente - 2006-10-24

    One of the offending files

     
  • Mike Dimmick

    Mike Dimmick - 2006-11-06

    Logged In: YES
    user_id=1040952

    Check the tool you're generating the type libraries with. I get a
    TYPE_E_CANTLOADLIBRARY error when trying to open the attached type library with
    oleview.exe (from the Platform SDK/VS2005). The problem seems to be in the coclass.

    If that tool cannot open it, it's very likely malformed.

     
  • Anthony Valente

    Anthony Valente - 2006-11-15

    Logged In: YES
    user_id=1602924
    Originator: YES

    Thanks Mike. The file was created with VB6. I can open the file happily with my copy of oleview (v2.10.054)

     
  • Jeff Skaistis

    Jeff Skaistis - 2007-02-23

    Logged In: YES
    user_id=1174379
    Originator: NO

    I have the same problem with a type library generated with MIDL. From checking the source, the problem is coming from the native LoadLibraryEx call. LoadLibrary(Ex) will display an error message box whenever you attempt to load a non-DLL image file. Since the code in UtilHarvesterMutator attempts to load the file first as a regular DLL then as a TLB if that fails, you get the message box before it will continue successfully processing the TLB.

    Probably should add an explicit file extension check (.TLB) before running it through the DllHarvester.

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 21 days (the time period specified by
    the administrator of this Tracker).