html context sensitive help crahes my exe

Posted on 2007-08-07
Last Modified: 2010-04-30
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?
Question by:isnoend2001
    LVL 7

    Accepted Solution

    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)

    Author Comment

    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

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now