Discussion:
HHC4012: Warning - Context sensitive help
(too old to reply)
Mike
2009-07-07 12:47:53 UTC
Permalink
After playing with this, and finally got it working,

http://msdn.microsoft.com/en-us/library/ms670096(VS.85).aspx

I am wondering if there a file naming limitation with the compiler or
something I am not doing right.

The issue seem to be a file name limitations:

My original HHP file had this:

[ALIAS]
#include wcsslConfig.Alias.h

[MAP]
#include wcsslConfig.hm

[TEXT POPUPS]
wcsslConfig.hm
wcsslconfig.topics.txt

The above files are auto-created (except wcsslconfig.topics.txt)

This compiles without warning so I assume "everything" was ok.

However, when calling HtmlHelp(), I got a cannot open help file error.

Cannont open the file "wcsslconfig.chm::wcsslconfig.topics.txt"

After a few hours trying to see what was wrong, trying full paths,
researching examples, getting 1/2 way there with HHC4012 warnings now,
I finally got it to work by renaming:

wcsslConfig.hm ==> wcsslconfig-topics.h
wcsslconfig.topics.txt ==> wcsslconfig-topics.txt

and changing the HtmlHelp() help file name to:

"wcsslconfig.chm::wcsslconfig-topics.txt"

So it seems, the compiler is looking for specific extensions and the
file name can only have one extension.

However, this doesn't seem to be the case with the alias file,
"wcsslConfig.Alias.h" That seems to be read in fine.

Anyway, it appears I have to change code that generate these files.
These files were used for the old help system, worked and there are
still some older projects using the old hlp (thats changing soon).

Is there a limitation in the compiler or am I including/importing them
incorrectly in the HHP file?

Thanks

--
Ulrich Kulle [MVP]
2009-07-08 19:05:05 UTC
Permalink
This post might be inappropriate. Click to display it.
Rainer H. Rauschenberg
2009-07-10 14:22:47 UTC
Permalink
Post by Ulrich Kulle [MVP]
HTMLHelp is a bit dated and old rules are welcome - sometimes it's a bitchy compiler. So, please use short file names and only
one dot and no blank (near like good old DOS 8.3 file name format).
We have some pretty long filenames in our chms and no problems with that
(had to limit it because of Joliet-pathname-limits, some of our help is
also shipped on CD as decompiled HTML).
hls
2009-07-10 18:08:10 UTC
Permalink
Post by Rainer H. Rauschenberg
Post by Ulrich Kulle [MVP]
HTMLHelp is a bit dated and old rules are welcome - sometimes it's a bitchy compiler. So, please use short file names and only
one dot and no blank (near like good old DOS 8.3 file name format).
We have some pretty long filenames in our chms and no problems with that
(had to limit it because of Joliet-pathname-limits, some of our help is
also shipped on CD as decompiled HTML).
Its probably a good rule (8.3), but yes, I haven't see issue with LFN,
just extension issues.
Rob Chandler [MVP]
2009-07-11 02:49:41 UTC
Permalink
My thoughts...

We have seen examples where H1 takes everything after the
first period as a file extension. So good to have only one dot in a
filename.

Path length: If the c:\externalpath\help.chm::/internalpath/file.exe path
length is > 256 we have seen problems. Move the project folder closer to the
root of the drive and shorten project folder & files names.

Rob
MS Help MVP
http://helpware.net/FAR/
Post by Mike
After playing with this, and finally got it working,
http://msdn.microsoft.com/en-us/library/ms670096(VS.85).aspx
I am wondering if there a file naming limitation with the compiler or
something I am not doing right.
[ALIAS]
#include wcsslConfig.Alias.h
[MAP]
#include wcsslConfig.hm
[TEXT POPUPS]
wcsslConfig.hm
wcsslconfig.topics.txt
The above files are auto-created (except wcsslconfig.topics.txt)
This compiles without warning so I assume "everything" was ok.
However, when calling HtmlHelp(), I got a cannot open help file error.
Cannont open the file "wcsslconfig.chm::wcsslconfig.topics.txt"
After a few hours trying to see what was wrong, trying full paths,
researching examples, getting 1/2 way there with HHC4012 warnings now, I
wcsslConfig.hm ==> wcsslconfig-topics.h
wcsslconfig.topics.txt ==> wcsslconfig-topics.txt
"wcsslconfig.chm::wcsslconfig-topics.txt"
So it seems, the compiler is looking for specific extensions and the file
name can only have one extension.
However, this doesn't seem to be the case with the alias file,
"wcsslConfig.Alias.h" That seems to be read in fine.
Anyway, it appears I have to change code that generate these files. These
files were used for the old help system, worked and there are still some
older projects using the old hlp (thats changing soon).
Is there a limitation in the compiler or am I including/importing them
incorrectly in the HHP file?
Thanks
--
Rob Cavicchio
2009-07-11 17:46:20 UTC
Permalink
Windows also gives you the ability to retrieve the "short path" (i.e.,
DOS-compatible 8.3 path) of any file or folder, even through scripting. So
if you build through an automated process, it's not a bad idea to feed the
compiler the short path of the HHP file. I've had success with that.
Post by Rob Chandler [MVP]
My thoughts...
We have seen examples where H1 takes everything after the
first period as a file extension. So good to have only one dot in a
filename.
Path length: If the c:\externalpath\help.chm::/internalpath/file.exe path
length is > 256 we have seen problems. Move the project folder closer to
the root of the drive and shorten project folder & files names.
Rob
MS Help MVP
http://helpware.net/FAR/
Post by Mike
After playing with this, and finally got it working,
http://msdn.microsoft.com/en-us/library/ms670096(VS.85).aspx
I am wondering if there a file naming limitation with the compiler or
something I am not doing right.
[ALIAS]
#include wcsslConfig.Alias.h
[MAP]
#include wcsslConfig.hm
[TEXT POPUPS]
wcsslConfig.hm
wcsslconfig.topics.txt
The above files are auto-created (except wcsslconfig.topics.txt)
This compiles without warning so I assume "everything" was ok.
However, when calling HtmlHelp(), I got a cannot open help file error.
Cannont open the file "wcsslconfig.chm::wcsslconfig.topics.txt"
After a few hours trying to see what was wrong, trying full paths,
researching examples, getting 1/2 way there with HHC4012 warnings now, I
wcsslConfig.hm ==> wcsslconfig-topics.h
wcsslconfig.topics.txt ==> wcsslconfig-topics.txt
"wcsslconfig.chm::wcsslconfig-topics.txt"
So it seems, the compiler is looking for specific extensions and the file
name can only have one extension.
However, this doesn't seem to be the case with the alias file,
"wcsslConfig.Alias.h" That seems to be read in fine.
Anyway, it appears I have to change code that generate these files. These
files were used for the old help system, worked and there are still some
older projects using the old hlp (thats changing soon).
Is there a limitation in the compiler or am I including/importing them
incorrectly in the HHP file?
Thanks
--
Rob Chandler [MVP]
2009-07-12 02:37:03 UTC
Permalink
Hi Rob
Thanks! Didn't know you could do that in script. What's the call (if you
have it at your finger tips)?
For my FAR 5 Unicode release I use that trick to allow HHP files to compile
and run in Unicode folders. Richard Sloggett (Innovasys) also uses it with
Document! X (there is a setting 'Generate shortened alias filenames' ).
Rob
Post by Rob Cavicchio
Windows also gives you the ability to retrieve the "short path" (i.e.,
DOS-compatible 8.3 path) of any file or folder, even through scripting. So
if you build through an automated process, it's not a bad idea to feed the
compiler the short path of the HHP file. I've had success with that.
Post by Rob Chandler [MVP]
My thoughts...
We have seen examples where H1 takes everything after the
first period as a file extension. So good to have only one dot in a
filename.
Path length: If the c:\externalpath\help.chm::/internalpath/file.exe path
length is > 256 we have seen problems. Move the project folder closer to
the root of the drive and shorten project folder & files names.
Rob
MS Help MVP
http://helpware.net/FAR/
Post by Mike
After playing with this, and finally got it working,
http://msdn.microsoft.com/en-us/library/ms670096(VS.85).aspx
I am wondering if there a file naming limitation with the compiler or
something I am not doing right.
[ALIAS]
#include wcsslConfig.Alias.h
[MAP]
#include wcsslConfig.hm
[TEXT POPUPS]
wcsslConfig.hm
wcsslconfig.topics.txt
The above files are auto-created (except wcsslconfig.topics.txt)
This compiles without warning so I assume "everything" was ok.
However, when calling HtmlHelp(), I got a cannot open help file error.
Cannont open the file "wcsslconfig.chm::wcsslconfig.topics.txt"
After a few hours trying to see what was wrong, trying full paths,
researching examples, getting 1/2 way there with HHC4012 warnings now, I
wcsslConfig.hm ==> wcsslconfig-topics.h
wcsslconfig.topics.txt ==> wcsslconfig-topics.txt
"wcsslconfig.chm::wcsslconfig-topics.txt"
So it seems, the compiler is looking for specific extensions and the
file name can only have one extension.
However, this doesn't seem to be the case with the alias file,
"wcsslConfig.Alias.h" That seems to be read in fine.
Anyway, it appears I have to change code that generate these files.
These files were used for the old help system, worked and there are
still some older projects using the old hlp (thats changing soon).
Is there a limitation in the compiler or am I including/importing them
incorrectly in the HHP file?
Thanks
--
Rob Cavicchio
2009-07-18 20:39:56 UTC
Permalink
Post by Rob Chandler [MVP]
Post by Rob Cavicchio
Windows also gives you the ability to retrieve the "short path" (i.e.,
DOS-compatible 8.3 path) of any file or folder, even through scripting.
So if you build through an automated process, it's not a bad idea to feed
the compiler the short path of the HHP file. I've had success with that.
Thanks! Didn't know you could do that in script. What's the call (if you
have it at your finger tips)?
It's just the "ShortPath" property of a File or Folder object retrieved
using the "FileSystemObject" interface:

http://msdn.microsoft.com/en-us/library/tes8ehwe(VS.85).aspx


********************
Rob Cavicchio
***@mvps.org

Loading...