7

I have a 64-bit-only COM DLL that I want to harvest typelib info from, using heat.exe. But when I attempt to do that, I get the error 193 (bad executable format). Is heat.exe 32-bit only, and cannot work with 64-bit executables? I found only one version of heat.exe on my machine.

Thanks.

Max
  • 170
  • 1
  • 10
  • I believe the commercial [WiX Expansion Pack](https://www.firegiant.com/products/wix-expansion-pack/) has some features for this. And I'll mention [this answer too - about COM registration in general](https://stackoverflow.com/a/55459208/129130). – Stein Åsmul Sep 02 '19 at 09:35
  • And one more - from Nir Bar's github, a well known computer expert: https://github.com/nirbar/WixHeatATLHarvesterExtension - it seems the component was written by Robert Yang with input from Roger Orr. I am not sure. Give it a test spin? It used to have some "unknown product" warnings on virustotal.com, but looks OK now. – Stein Åsmul Sep 02 '19 at 09:46

5 Answers5

3

Unfortunately heat.exe is indeed 32-bit and can therefore only harvest 32-bit COM registrations: http://wixtoolset.org/issues/1661/

However 64-bit heat.exe extensions are discussed here: http://sourceforge.net/p/wix/mailman/message/30541133/ and code can be found here: https://wix.codeplex.com/SourceControl/network/forks/roberthyang/NewHeatExtension/latest

Adrian Taylor
  • 4,054
  • 2
  • 24
  • 26
2

Depending on what you are trying to do there may be a solution, if you just need to add the Win64 attribute you can do that through candle.exe see here

Otherwise you may also have found a known bug that is unresolved.

Community
  • 1
  • 1
Rick Bowerman
  • 1,866
  • 12
  • 12
  • I was trying to get COM registration information from that module. Fortunately, as I myself wrote it, I simply pasted the GUIDs and other stuff into the heat-generated registration snippet from another module. – Max May 20 '14 at 16:47
0

I have had similar issues, whentrying to to harvest vb6 and non .net libraries. Can you try heat with -scom -o

If that doesn't solve the problem, can you paste your heat command here.

Qash
  • 167
  • 1
  • 12
0

In my case I needed a separate package for 32 and 64 bit COM DLLs. Using the harvest from the 32bit DLL worked for the 64bit version. Just needed to make sure the build configuration was 64bit specific.

washfaq
  • 336
  • 4
  • 9
0

If you can let the warnings flow, and you have just a very small number of files as 64-bits DLL, you can try the following:

  • run HEAT.EXE as usual, creating your output file;
  • Edit the file, and add SelfRegCost="0" to each file element you need to include

Example:

<Directory Id="dir..." Name="MyDLL">
  <Component Id="cmp..." Guid="...">
    <File Id="fil..." KeyPath="yes" 
     Source="...\MyDLLFile.dll" 
     SelfRegCost="0" />
  </Component>
</Directory>

https://wixtoolset.org/documentation/manual/v3/xsd/wix/file.html

I had to manage just one DLL like that in my package, and it worked

reverpie
  • 371
  • 2
  • 6