none
All my 64-bits executables will generate an exception whenever trying to use its *.chm file! RRS feed

  • Question

  • Dear friends,

    Calling HtmlHelp() in any normal way from a 64-bits application will throw an exception that kills my executable. I even recompiled my *.chm file with exactly this same result. My *.chm file seems to be OK because I will be able to process it and it seems to be behaving normally. I have in the link properties included htmlhelp.lib. I am running Visual Studio Community 2019 under Windows 10. My executables character set is UNICODE. Everything went fine when running the same executables in 32-bits.

    I am Ton Epskamp  at a.epskamp@ziggo.nl.

    Saturday, January 25, 2020 10:33 AM

All replies

  • I cannot reproduce this on Windows 10 - 1803, 17134.1130 (VS 2015)

    Tested in x64 with a .CHM from MS SDK :

    HtmlHelp(GetDesktopWindow(), TEXT("E:\\Program Files\\Doc\\SHELLCC.CHM"), HH_DISPLAY_TOPIC, 0);


    • Edited by Castorix31 Saturday, January 25, 2020 11:06 AM
    Saturday, January 25, 2020 11:05 AM
  • Thank you very much, Castorix31, because now I know my executable is the reason for this abnormal behaviour of my executable!

    Ton Epskamp.

    Saturday, January 25, 2020 10:40 PM
  • Hi Ton1 Epskamp,

    Sorry for delay in reply.

    Please follow these steps to check if chm file could be opened in x64 version.

    1. go to C:\Windows\SysWOW64
    2. open cmd.exe
    3. type the command which is like:                                                                     

    If it could not work, you could refer this thread about how to run 32-bit process in a 64-bit environment.

    Any feedback will be expected.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, January 27, 2020 5:32 AM
  • Hello Dylan,

    I tried to do exactly as you wrote it and after that I ran one of my projects, hit the F1 key and my program aborted as it did before. I remember from very long ago a little of the WOW functionality. My program is of course 64-bits and my chm-file is 32-bits So I don't understand what is going wrong! Again many thanks from

    Ton Epskamp.

    Tuesday, January 28, 2020 9:38 PM
  • I've only done this in VB and I use 32 bit, but I thought I would show you what works for me and see if it helps.

    Help.ShowHelp Method

    Here is my code: (it is in VB but it should help with the procedure)

        Private Sub mnuHelp_Click(sender As Object, e As RoutedEventArgs) Handles mnuHelp.Click
    
    
            Try
    
                System.Windows.Forms.Help.ShowHelp(Nothing, modVar.HelpFilePath)
    
            Catch ex As Exception
    
                Call Gyrospring.Window.MessageBoxHelper.PrepToCenterMessageBoxOnForm(Me)
                MessageBox.Show("Error message: " & ex.Message, "HELP", MessageBoxButton.OK, MessageBoxImage.Error)
    
            End Try
    
    
        End Sub

    I hope that can help you.


    George Frias - AWWshop @ Wikidot, Wiki1978

    Tuesday, January 28, 2020 9:53 PM
  • Dear friends and helpers,

    I am converting all of my 32-bits projects into 64-bits projects in Visual Studio Community 2019. For all of my 32-bits projects I used HTML Help Workshop to create all of these *.chm files. They remain working perfectly in the 32-bits projects. But apparently the HTML Help Workshop will create 32-bits *.chm files. And calling them from outside my 64-bits executable will still succeed but from within will generate somewhere an exception killing this executable. I tried to recompile my *.chm files using again this same HTML Help Workshop of Windows 10 without any improvement. I suppose a 64-bits htmlhelp.lib or a 64-bits version of my htmlhelp() calls from within my 64-bits executable's might exist but HOW AND WHERE? I remained completely content with these compiled html files! Some of you might make me very grateful because of both your experience and my inexperience.

    I am Ton Epskamp at a.epskamp@ziggo.nl.

    Thursday, January 30, 2020 10:18 PM
  • Hi Ton1 EPskamp,

    Sorry for delay in reply.

    After my research, I found a similar thread: Opening a CHM file on a 64bit system, maybe it could help you.

    BTW, you could also redirect to Help & Manual Forums, where you could get better support about it.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, February 12, 2020 7:28 AM