News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Windows 10 chm help files

Started by TouEnMasm, March 10, 2016, 07:45:40 PM

Previous topic - Next topic

TouEnMasm

Having problems with the htmlhelp function,I solved the problem doing a dynamic link
with the hhctrl.ocx.
Here is a sample of use with the needed include files.
The htmlhelp.sdk is here:
http://masm32.com/board/index.php?topic=563.msg4563#msg4563
Fa is a musical note to play with CL

jj2007


mabdelouahab

QuoteImpossible de démarrer le programme car il manque vcruntime140.dll ...

TouEnMasm

"Vcruntime140.dll not found"

You need the "redistributables packages  Visual C++ 2015",search MSDN for them.It's a free download.
The prog is compile Under Windows 10 and Visual Studio community 2015.
https://www.microsoft.com/fr-fr/download/details.aspx?id=48145
Fa is a musical note to play with CL

jimg

I would think you would make it work with the windows 10 stock runtimes.
My stock install came with Visual C++ 2013 redistributable (x64) and (x86)  11.0.50727

TouEnMasm

QuoteMy stock install came with Visual C++ 2013 redistributable (x64) and (x86)  11.0.50727
Download the redistributable 2015 is the only solution.
I will not install the vc++ 2013 and visual studio 2013 only to make please those who have this one.
If I do that ,i need also to install the precedents versions of vc++.
With the header provided,Dyna_hhctrl.inc,you can compile your own caller of chm files.
Fa is a musical note to play with CL

jj2007

#6
Quote from: ToutEnMasm on March 11, 2016, 06:44:37 PMI will not install the vc++ 2013 and visual studio 2013 only to make please those who have this one.

Yves,

It is one of the precious traditions of this forum that everybody makes an effort to ensure that code runs on older systems, too. Every single function of MasmBasic, for example, is both Win8 and XP compatible (probably also Win10, but I won't test it :icon_mrgreen:). I don't have much experience with GoAsm, RadAsm, Easy Code, ObjAsm, to name a few, but I would be really surprised if they didn't run on the whole range of current Windows versions.

TWell

#7
I am not a masm programmer, so this is simplified example to same thing
.386
.model flat,stdcall
option casemap:none

ExitProcess PROTO :DWORD
LoadLibraryA PROTO :DWORD
FreeLibrary PROTO :DWORD
GetProcAddress PROTO :DWORD,:DWORD
includelib  kernel32.lib

MessageBoxA PROTO :DWORD,:DWORD,:DWORD,:DWORD
includelib  user32.lib

HH_AKLINK STRUCT
cbStruct DWORD ?
fReserved DWORD ?
pszKeywords DWORD ?
pszUrl DWORD ?
pszMsgText DWORD ?
pszMsgTitle DWORD ?
pszWindow WORD ?
fIndexOnFail DWORD ?
HH_AKLINK ENDS

tfHtmlHelpA TYPEDEF PROTO STDCALL :DWORD,:DWORD,:DWORD,:DWORD
tpHtmlHelpA TYPEDEF PTR tfHtmlHelpA

HtmlHelpKey PROtO hWnd:DWORD,sHlp:DWORD,sKey:DWORD

.data
; for HtmlHelpKey inc
sMod db "hhctrl.ocx",0
sFun db "HtmlHelpA",0
hMod dd 0
HtmlHelpA tpHtmlHelpA 0
link HH_AKLINK <sizeof HH_AKLINK,0,0>
;
sHlp db "masm32.chm",0
sKey db "align",0

.code
start:
invoke HtmlHelpKey,0,addr sHlp,addr sKey
invoke MessageBoxA,0,0,0,0
;invoke FreeLibrary,hMod
invoke ExitProcess,0

HtmlHelpKey PROC hWnd:DWORD,spHlp:DWORD,spKey:DWORD
.if !HtmlHelpA ; is function found
invoke LoadLibraryA,addr sMod
mov hMod, eax ; save module handle
.if eax
invoke GetProcAddress,eax,addr sFun
.if eax
mov HtmlHelpA,eax
.else
mov HtmlHelpA,-1 ; mark not exist
.endif
.endif
.endif
.if HtmlHelpA != -1 ; found hhctrl.ocx ?
mov eax, spKey
mov [link.pszKeywords], eax
invoke HtmlHelpA,hWnd,spHlp,0Dh,addr link
.endif
ret
HtmlHelpKey ENDP

END start


jj2007

Good question!

Quote... Visual Studio 2015. We are especially appreciative about the many excellent bugs that you've reported on Microsoft Connect

M$ are proud of their bugs nowadays :greensml:

TouEnMasm


If you are interested in the code,the two include files are generated by two Tools of mine.
dynamic link:
http://masm32.com/board/index.php?topic=581.msg4705#msg4705
interfaces of hhctrl.ocx
http://masm32.com/board/index.php?topic=576.msg4665#msg4665
Fa is a musical note to play with CL