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. ATL / WTL / STL
  4. Explorer extension dll - WM_SHUTDOWN

Explorer extension dll - WM_SHUTDOWN

Scheduled Pinned Locked Moved ATL / WTL / STL
c++questiondesignlinuxhelp
3 Posts 2 Posters 0 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.
  • A Offline
    A Offline
    AssemblySoft
    wrote on last edited by
    #1

    Hi, I have a dll that runs in the address space of Explorer. (Shell extension) So i do not have a main app, just a dll. I could use either MFC or ATL. My problem is i need to know when a Windows Shutdown event is being fired. I've never had this problem before because all my apps have a main window and receive this notification. However the dll just keeps working and terminates in an undetermined state. I can't have the dll called from an app. I have no alternative but to use what i've got. how can i register to receive a WM_SHUTDOWN event from my dll? Please don't suggest i change the design of the solution. I'm confined to what i have. thanks in advance Carl

    I 1 Reply Last reply
    0
    • A AssemblySoft

      Hi, I have a dll that runs in the address space of Explorer. (Shell extension) So i do not have a main app, just a dll. I could use either MFC or ATL. My problem is i need to know when a Windows Shutdown event is being fired. I've never had this problem before because all my apps have a main window and receive this notification. However the dll just keeps working and terminates in an undetermined state. I can't have the dll called from an app. I have no alternative but to use what i've got. how can i register to receive a WM_SHUTDOWN event from my dll? Please don't suggest i change the design of the solution. I'm confined to what i have. thanks in advance Carl

      I Offline
      I Offline
      Igor Vigdorchik
      wrote on last edited by
      #2

      You may try to use a Windows hook - WH_GETMESSAGE or WH_CALLWNDPROC and monitor WM_ENDSESSION message. Just a thought...

      A 1 Reply Last reply
      0
      • I Igor Vigdorchik

        You may try to use a Windows hook - WH_GETMESSAGE or WH_CALLWNDPROC and monitor WM_ENDSESSION message. Just a thought...

        A Offline
        A Offline
        AssemblySoft
        wrote on last edited by
        #3

        Igor, where were you yesterday? That's exactly what i did and it gives me the desired notification. - thanks. I would be interested in another method though if you have any thoughts. Kind Regards Carl

        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