Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. locked chm file.

locked chm file.

Scheduled Pinned Locked Moved C / C++ / MFC
helphtmlquestion
3 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    n1pabs
    wrote on last edited by
    #1

    Hi All, Hopefully someone can help me, if possible :) I have a problem with a locked chm file (htmlhelp file), it is launched from a printer driver so the process thats handling it is the explorer.exe, so when the help file is closed, explorer.exe still has a handle to the file. If I manual close the handle, using process explorer, then replace the file the html help window does not display the content. If I kill teh explorer.exe process and relaunch everything works OK. I believe the problem is due to the hhctrl.ocx not being unloaded until explorer.exe is closed and restarted, is there a way to unload hhctrl.ocx without killing the explorer.exe? Thanks!

    J 1 Reply Last reply
    0
    • N n1pabs

      Hi All, Hopefully someone can help me, if possible :) I have a problem with a locked chm file (htmlhelp file), it is launched from a printer driver so the process thats handling it is the explorer.exe, so when the help file is closed, explorer.exe still has a handle to the file. If I manual close the handle, using process explorer, then replace the file the html help window does not display the content. If I kill teh explorer.exe process and relaunch everything works OK. I believe the problem is due to the hhctrl.ocx not being unloaded until explorer.exe is closed and restarted, is there a way to unload hhctrl.ocx without killing the explorer.exe? Thanks!

      J Offline
      J Offline
      James R Twine
      wrote on last edited by
      #2

      Likely not - I believe that once a DLL is loaded into a process, unloading it is not possible (normally).    How about this - instead of opening the file itself, try copying it to a temp location and open the copy instead.  After having it opened, open/close it again (via code) with the DELETE_ON_CLOSE flag and the file should clean itself up when it is finally closed.    Peace!

      -=- James
      Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
      Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
      See DeleteFXPFiles

      N 1 Reply Last reply
      0
      • J James R Twine

        Likely not - I believe that once a DLL is loaded into a process, unloading it is not possible (normally).    How about this - instead of opening the file itself, try copying it to a temp location and open the copy instead.  After having it opened, open/close it again (via code) with the DELETE_ON_CLOSE flag and the file should clean itself up when it is finally closed.    Peace!

        -=- James
        Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
        Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
        See DeleteFXPFiles

        N Offline
        N Offline
        n1pabs
        wrote on last edited by
        #3

        Thanks for the suggestion, unfortunately this can not be done as it would involve re-writting alot of drivers. But if I can not unload it then there is nothing that can be done. Thanks again!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups