Thread: ShellProcs

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    404

    ShellProcs

    Hi all!
    i need a basic example for installing a globle shell hook. i think i know howto put a ShellProc in a dll and load it and call SetWindowsHookEx() from another app. But i havent seen a message handling ShellProc before. Could you guys please post an example of a working ShellProc, or direct me to a tutorial or something. Thanks for any help.
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amateur English)

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    I suppose it would look something like:
    Code:
    LRESULT CALLBACK MyShellProc(int nCode, WPARAM wParam, LPARAM lParam)
    {
      if (nCode<0)
        return CallNextHookEx(0,nCode,wParam,lParam);
    
      switch (nCode)
      {
      case HSHELL_WINDOWACTIVATED:
         //handle this message
      break;
      //handle other messages
      }
    
      return 0;
    }
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    404
    will try that. Thanks.
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amateur English)

Popular pages Recent additions subscribe to a feed