html context sensitive help crahes my exe

Hi experts
I am working on a program that dowloads files. I just noticed that if i open my html help with a context id # and then close the help. I am getting a path/file access error and vb crashes when i run my downloader. I read about this at microsoft and stated it applied to working in the IDE. I compiled to exe and it still happens. I can open the help to the main menu without using context id's and it does not happen.
I have also tried this Call HtmlHelp(Me.hWnd, "", HH_CLOSE_ALL, 0), before starting my download with no success. How can i correct this?
Who is Participating?
This has always work just fine for me:

Private Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hwndCaller As Long, ByVal pszFile As String, Byval uCommand As Long, ByVal dwData As Long) As Long

Private Const mcHelpContext = &HF

Dim ContextID As Long

Call HtmlHelp(Me.hWnd, App.HelpFile, mcHelpContext, ContextID)
isnoend2001Author Commented:
I'm giving the points because you were the only reply. I tried your way and got the result.
I fixed the prob by moving the download location to a tmp folder. The weird part of this if i opened help to the index and closed, no problem, only when i opened a context number
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.