Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot register DLL using WiX

Tags:

dll

com

wix

wix3.5

I am trying to register a DLL using WiX. Now I know and understand that I should use heat and get it to pull the registry information for me, but heat seems to fail with the following error message: heat.exe : warning HEAT5150 : Could not harvest data from a file that was expected to be a SelfReg DLL: C:\Users\seb\Desktop\Development\addin.dll. If this file does not support SelfReg you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the failure: Unable to load file: C:\Users\seb\Desktop\Development\addin.dll, error: 193

I've looked around and found this post which explains a bit more in detail about registering DLLs but I would like to avoid the self registration route if possible. I also see mention of manually registering the DLLs further down below, but I'm not too well versed with the registry or COM objects that well to know where I could even get the CLSID, ProgId, and any other information that has been mentioned.

If anyone can point me in the right direction or explain to me what I need to do to run the DLL through heat it would be greatly appreciated.

like image 629
Seb Avatar asked Sep 17 '12 16:09

Seb


2 Answers

I know this is old but I wanted to add an answer here - the reason this occurs is because the dll you are trying to register is 64 bit dll - and Heat.exe is 32 bit so it cannot load the dll in its address space. Anyway, just point to a 32 bit version of the dll to create the wxs file and you should not receive that error.

like image 118
Brian Small Avatar answered Nov 06 '22 23:11

Brian Small


Is this an unmanaged / native DLL? Does Dependency Walker show any missing dependencies? Usually this means the DllRegisterFunction failed and Heat couldn't extract any data. Fix that problem and you should get good XML meta.

like image 34
Christopher Painter Avatar answered Nov 06 '22 23:11

Christopher Painter