Application hangs in vista
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Application hangs in vista

  1. #1
    Join Date
    Apr 2005
    Posts
    125

    Angry Application hangs in vista

    Hi

    This problem is only seen in one customer (only vista) machine ....

    When the customer clicks help from the main window. the help CHM window is displayed but as a window with no contents .. as if the application is hung at that point... This doesn't occur every time ..

    Crash dump shows that the hang occurred here

    Code:
            hHtmlHelp = HtmlHelp( GetDesktopWindow(), 
                                  szHelpFileName, 
                                  uiHelpCommand, 
                                  (DWORD)pBufferPos);
    
    
    return TRUE; // The crash dump points here
    the variables are here
    hHtmlHelp = 0x000f02f4
    pBufferPos = 0x00000000 ""
    uiHelpCommand = 0
    szHelpFileName = char [260] "D:\MyApp\Help\General.CHM"

    Any suggestions ?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,307

    Re: Application hangs in vista

    Sorry, there isn't enough to go on.

  3. #3
    Join Date
    Apr 2005
    Posts
    125

    Re: Application hangs in vista

    Thanks for the reply.

    Is there any documentation that says this API calls will have problems in vista etc ?

    Was searching online for quite sometime.

    The symptom i see is that this API takes quite sometime to open help document.

    Thanks in advance.

  4. #4
    Join Date
    Apr 1999
    Posts
    27,429

    Re: Application hangs in vista

    Quote Originally Posted by softmessager View Post
    Thanks for the reply.

    Is there any documentation that says this API calls will have problems in vista etc ?
    Do other applications on your machine have trouble opening their help files? If not, then this points to only your program as having issues, not Vista.

    Why not write a simple program where all you do is call that function with hard-coded names? (do not use variables)
    Code:
    #include <windows.h>
    // other includes 
    int main()
    {
        HtmlHelp( GetDesktopWindow(), 
                        "D:\\whatever.chm",
                        HH_DISPLAY_TOPIC,
                        0);
    }
    Now you have a complete program and

    1) we will have much more information and we see everything without it being hidden behind information taken from a crash dump.

    2) no other parts of the application can potentially corrupt the app, since there is only one line being executed.

    3) You now have a small program that you need to get working first before trying things in the larger program.

    If that program above works correctly, then this points to you having something being done in your larger application that is causing the issue, and not the HtmlHelp function itself.

    Regards,

    Paul McKenzie

  5. #5
    Join Date
    Apr 2005
    Posts
    125

    Resolved Re: Application hangs in vista

    Friends I am close to resolving the issue ...

    Just wanted to post my reply so that it may help someone ...

    for one ... in my code above ... the "GetDesktopWindow()" .. can fail in some vista machines ..I have inserted the code for checking the return value of this call before calling HtmlHelp

    Secondly , while these hangs in vista, please also consider other factors .. like drivers ..... etc
    In my case , the DWM.exe in task manager was using a lot of memory..

    One very good tool to check application compatibility in vista is to run application via the application verifier tool....

    Hope this helps someone.
    Thanks forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center