Hook firefox window to get WM_CLOSE & WM_QUIT
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Hook firefox window to get WM_CLOSE & WM_QUIT

  1. #1
    Join Date
    Apr 2014
    Posts
    3

    Question Hook firefox window to get WM_CLOSE & WM_QUIT

    I'd like to make a DLL, which I inject into firefox upon starting. This DLL would look for thoose two events (WM_CLOSE / WM_QUIT). If it's found, then it executes some code, BUT the main process shouldn't quit, since it would terminate my dll too
    I'm really noobie in C++ and any kind of programming, I'm still learning a lot. I've got no idea how to start. I've already made the injectable DLL.

    I tried to set up a Callback, but obviously it isn't working. Could you help me how could I run my own code before closing the firefox?

    Thanks for the help!

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

    Re: Hook firefox window to get WM_CLOSE & WM_QUIT

    So how will users close FireFox?

  3. #3
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,472

    Re: Hook firefox window to get WM_CLOSE & WM_QUIT

    Quote Originally Posted by Unc3nZureD View Post
    This DLL would look for thoose two events (WM_CLOSE / WM_QUIT). ... then it executes some code,
    What kind of code is it supposed to be? and what for?

    Quote Originally Posted by Arjay View Post
    So how will users close FireFox?
    using the Task Manager?
    Victor Nijegorodov

  4. #4
    Join Date
    Apr 2014
    Posts
    3

    Re: Hook firefox window to get WM_CLOSE & WM_QUIT

    Sorry, I wasn't clear. It will exit after running my code. I mean I'd like to inject a code before exiting.

  5. #5
    Join Date
    Apr 2014
    Posts
    3

    Re: Hook firefox window to get WM_CLOSE & WM_QUIT

    I can't edit anymore, now I'm writing my reason why I want it

    I'd like to encrypt my passwords file with my own algorhytm. I know I can't 100% protect it, but if it's unique, noone will be able to steal them :P [Since it's really easy to decrypt firefox passwords] I wouldn't like to use master password.

    I'd like to clean up things before exit.

  6. #6
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,986

    Re: Hook firefox window to get WM_CLOSE & WM_QUIT

    Will be a lot easier to just download the Firefox source, and replace the password file code.

    Or if you can't/don't want do that, create a password manager plugin for Firefox.

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