Skip to content

Conversation

@johnd0e
Copy link
Contributor

@johnd0e johnd0e commented Feb 9, 2026

Every time (if I haven't edited the help files for a long time), I run into the issue of CHM compilation failing.
And each time, it takes some time before I figure out the cause.
The reason is trivial: the Microsoft HTML Help Workshop must be installed.
However, hh_compiler.exe simply exits silently without any error messages.
Given that it doesn't output any messages upon launch, it's initially unclear whether it's working at all.

Therefore, I've added the following messages:

Usage:

Usage: D:\xxx\FarManager\enc\tools\hh_compiler\hh_compiler.exe <CodePage> <InputHHP>
Error encountered
[*] Target CodePage: 1
[*] Loading hha.dll...
[!] LoadLibraryA("hha.dll") failed. Error: 126

--------------------------------------------------------------------------------
RECOMMENDATION:
Microsoft HTML Help Workshop should be installed.
--------------------------------------------------------------------------------

Normal flow
[*] Target CodePage: 1251
[*] Loading hha.dll...
[*] Patching function: GetACP
[*] Patching function: MultiByteToWideChar
[*] Patching function: WideCharToMultiByte
[*] Starting compilation of 'pluginsr.hhp'...
Microsoft HTML Help Compiler 4.74.8702

Compiling d:\xxx\FarManager\enc\build\chm\ru\FarEncyclopedia.ru.chm

...

[*] CompileHHP finished successfully.

Copilot AI review requested due to automatic review settings February 9, 2026 16:25
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

@johnd0e
Copy link
Contributor Author

johnd0e commented Feb 9, 2026

The next thing I usually try is, instead of installing that legacy piece of software into my system,
I just copy hha.dll into the hh_compiler\ directory.
Of course, that is not enough: "HHC6003: Error: The file Itircl.dll has not been registered correctly."
Unfortunately, this message is not helpful at all, and there is even no solution in the first Google search results.
That's why I added special handling for this case:

--------------------------------------------------------------------------------
RECOMMENDATION:
Make sure that `itcc.dll` exists and run the following command
with Administrator privileges:
regsvr32 "D:\xxx\FarManager\enc\tools\hh_compiler\itcc.dll"

ERROR:
The required file was NOT found at the expected location:
D:\xxx\FarManager\enc\tools\hh_compiler\itcc.dll
--------------------------------------------------------------------------------

(Source: http://mvps.org/htmlhelpcenter/itircl.htm)

Note that this message appears only when hha.dll is already present either in system. or near hh_compiler.exe.

But yes, in general, there is no need to install the full HTML Workshop package; it's enough to have just two files of its content.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@alabuzhev
Copy link
Contributor

alabuzhev commented Feb 9, 2026

RECOMMENDATION:
Microsoft HTML Help Workshop should be installed.

RECOMMENDATION:
Make sure that itcc.dll exists and run the following command
with Administrator privileges:
rundll32 "D:\xxx\FarManager\enc\tools\hh_compiler\itcc.dll",DllRegisterServer

So what is the 'recommended' way?
Install it normally or mess with random dlls?

@johnd0e
Copy link
Contributor Author

johnd0e commented Feb 9, 2026

Officially, I don't recommend anything other than the official installation. And even in this case, problems may arise, and the solution that I present was originally focused on a fully installed Workshop.
My dll files are also not so random, but were once installed, but I prefer to mess with them for personal reasons (although I suspect that I'm not the only one).

@alabuzhev
Copy link
Contributor

I prefer to mess with them for personal reasons (although I suspect that I'm not the only one)

That's perfectly fine, I'm not judging.
My point is that you want to add informational messages that somewhat contradict each other: one recommends installing the workshop, another recommends manually registering enc\tools\hh_compiler\itcc.dll, which normally does not exist at that particular location.
It for sure exists in your clone (because you put it there), but for obvious reasons we need something more generic, e.g. without mentioning any paths.

rundll32 "D:\xxx\FarManager\enc\tools\hh_compiler\itcc.dll",DllRegisterServer

regsvr32 path\itcc.dll, no?

@johnd0e
Copy link
Contributor Author

johnd0e commented Feb 10, 2026

one recommends installing the workshop

This is exactly what is encountered by anyone who does not have the workshop installed.

another recommends manually registering enc\tools\hh_compiler\itcc.dll

This applies only in case of one very specific error. And the path is determined dynamically.

which normally does not exist at that particular location

The location is wherever the loaded hha.dll is located. This is normally in c:\windows\system32 (syswow64).

e.g. without mentioning any paths.

The exact path should still be specified even if the DLL is located in the current directory, because the command will be run with elevated privileges.

As for exact command, than I will check it again tomorrow, thank you for pointing this out.

Guide user through solution of cryptic "HHC6003: Error: The file Itircl.dll has not been registered correctly."
Source: https://web.archive.org/web/20000620213107/http://mvps.org/htmlhelpcenter/itircl.htm
@johnd0e
Copy link
Contributor Author

johnd0e commented Feb 10, 2026

regsvr32 path\itcc.dll, no?

fixed

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants