I have rewritten the parsing of the supplied path in the RadHelp add in for RadASM. There were issues with quoted strings, spaces in paths as well as its ability to find the file extension, leading to difficulty in designing command lines for it. I decided to make it a little cleaner, the existing code was a mess so I put the scan for tokens into a separate procedure. It now handles quotes around the path properly as well as more effectively determining the split between paths and arguments. Spaces in paths are handled by enclosing the path in quotes, including any $ tokens (ie $D), it will replace $$ with $ and single $ will be removed. Leading and trailing spaces are removed from both the arguments and the path, the quotes are removed from the path before sending it to CreateProcess. I have tested this with as many permutations as I could think of and it all seems to be working, since the parser is now more modular it is easier to expand. The following tokens have been added (because I needed them). The changes have no effect on existing command lines, anything that worked before should still work, its just that now quite a few other things will as well.

$S = system folder
$W = Windows folder

It is now completely OK to use the following syntax:

"$D\Help2 Viewer.exe" /$K /MS.MSDNQTR.v90.en

And the line will be parsed properly.

Help2 Viewer can now accept command lines from RadASM making it possible to use it as your API viewer with the above command line, just copy Help2 Viewer to the addins folder and enter the command line in RadHelp options. The collection name is optional (version 0.6.2.5 and above), if it is not supplied the default registry entry will be used, if the supplied collection is different than the one saved in the registry you will not be prompted to save it when you quit the application, so when you restart Help2 Viewer it will load the previous default collection.
Attachments:
Posted on 2009-03-06 15:13:31 by donkey
Good job... updated my RAD Help file Addins and DLL.

I wish I had the same motivation as you. I hope my eye of the tiger comes back. My projects folder looks like a mix of a incubator and a cemetery. :(
Posted on 2009-03-06 19:25:59 by JimmyClif
Thanks,

I'm not sure about the eye of the tiger, I needed to fix it in order to use Help2 Viewer. I would much rather have a viewer that I wrote and can modify whenever I want to than a closed box like H2Viewer, although that is a great package its not mine. I have recently taken to writing my own tools because if I find something lacking or difficult I can just rewrite that section of code. I am about half way through the HTMLHelp1.x parser, I can decompile a CHM file and scan the index, but it is still seriously flawed and I think I may have to write a nearly complete XML parser to do everything I want. When that happens you will use the same command line but with the CHM path in place of the namespace, "one stop help shop" :). Finally I am hoping to get a bit of preliminary information on Help3 which will be released very soon (hopefully documented with an SDK).
Posted on 2009-03-06 20:24:24 by donkey