F1 help context bugs when App is starded from Createprocess()

Hi ,
I've created an application in which I implemented F1 help context. Everything works well when the application is launched by mouse (chm help files deploy well when I hit F1). But when the same application is launched by Createprocess( ), the F1 help context stops working (nothing happen anymore when I hit F1). I suspect that CreateProcess makes the child application loose his help context. But I haven't yet found the way to solve that . Does someone has a solution for that
Thanks.



Answer this question

F1 help context bugs when App is starded from Createprocess()

  • Jeremy Jarrell

    Nikita, this forum isn't really the best one for deeper issues such as yours anyway. Maybe the people in the Win32 kernel newsgroup might be able to help: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.win32.programmer.kernel&lang=en&cr=US


  • REspawn

    About rights: Its just a guess. But if you didn't reduced any rights nothing should be different when starting a process from the explorer or starting it from a process that was started from the explorer.

    Sorry I have no more idea.



  • dakota367

    Is it possible that the problem arrises due to a wrong working directory How do you open the help file Did you defned the complete path or just the filename itself. If you just used the file name, the file will be opened in the current working directory. This might be different if you used CreateProcess.

    Determine the location of the exe file using GetModuleFileName, than get the path and define the location of the helpfile with the complete path and file name.



  • Mike36

    It's more bizarre than what I thought.
    I put some code after the Htmlhelp( ) function (used to call the html help file on F1 ). Nothing happen when HtmlHelp() is called. But the rest of code after that line works well.
    And on your suggestion, I've tried to use the full path: no results.

    ps: I do know that when createprocess() is called, the child process is loaded on the parent's context. Does that make the child loose its help context (possibly because the parent has no help context implemented ).

    Thanks.

  • alexsk8

    Hi guys,
    Thank you all for trying to solve that problem with me. I've finally found what could probably be the reason of this bug. Read what Microsoft said about bugs&craches when trying to run F1 in a child process context. :
    http://windowssdk.msdn.microsoft.com/en-us/library/ms669980.aspx#29
    http://support.microsoft.com/kb/194116

    Best regards. Nikita.

  • MNDANG

    I would use Spy++ to track keyboard events. Then use the debugger to determine what's different in the code paths your executable is taking.
  • ibis1

    The the handler function for the F1 key and the help system called I sopose yes.

    Is it possible that the rights of the parent process are not sufficient to open the help file



  • F1 help context bugs when App is starded from Createprocess()