-
Invoking HtmlHelp requires htmlhelp.lib to be included, so adding "includelib htmlhelp.lib" to my code should solve the problem, but, while it assembles fine then, i keep getting this when linking (MS´s linker): HTMLHELP.LIB(htmlhelp.obj) : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _LoadHHCtrl@0 providing protos for these three APIs doesn´t help either - what can i do? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
This should be added to the header file, so I will look into that. The DLL file for HtmlHelp is hhctrl.ocx so to test the import directly using:
If this works there's probably something wrong with the .LIB file you using or some additional |
Beta Was this translation helpful? Give feedback.
-
I added an update to Asmc to handle the extension for the DLL file. The pragma options for this (added to the header file) is:
The tools used for creating import libraries from system DLL's depends on a .DLL extension so creating the HtmlHelp library is a bit tricky. I modified the dlldef tool a bit to add argument count for 32-bit imports. Note that importing DLL's differ based on bit-ness, so you have to build the tool in the bit-ness as the library (I assume 32-bit in your case). The default for the
This produce a .DEF file like this:
Note that this is based on searching the binary object for the firs occurrence of a RET instruction and use the return size if found, so the result may not be correct. The header file only define two of these functions and the After correcting this I tried building the library using LIB:
This linked but failed to execute. Converting the .DEF to LIBW input worked for some reason.
|
Beta Was this translation helpful? Give feedback.
-
Many thanks, this indeed creates a working htmlhelp.lib in 32 bit! Now i have the same problem in 64 bit. Libw as far as i understand it cannot create 64 bit .lib files, or am i wrong here? |
Beta Was this translation helpful? Give feedback.
-
It's simpler in 64-bit (and __cdecl in 32-bit) as you can use the export names directly. The installer uses LIBW to create the import libraries for 64-bit by default, but optionally also LIB. The .DEF file for LIBW:
Command:
The .DEF file for LIB:
Command:
Note that the Dll* functions was removed here:
So the output from |
Beta Was this translation helpful? Give feedback.
-
Linkw doesn´t work for me in 64 bit, but Lib does - thanks! In the meantime i found this `@echo off REM Usage: dll2lib [32|64] some-file.dll dumpbin /exports %dll_file% > %exports_file% echo LIBRARY %lib_name% > %def_file% lib /def:%def_file% /out:%lib_file% /machine:%machine% REM Clean up temporary intermediate files on stackoverflow, which works fine as well. |
Beta Was this translation helpful? Give feedback.
It's simpler in 64-bit (and __cdecl in 32-bit) as you can use the export names directly. The installer uses LIBW to create the import libraries for 64-bit by default, but optionally also LIB.
The .DEF file for LIBW:
Command:
The .DEF file for LIB:
Command:
Note that the Dll* functions was removed here: