about CALLBACK GetMsgProc and LPARAM

From: Qzg=FCr=20TU=D0RUL?= (oztugrul_at_hacettepe.edu.tr)
Date: 12/29/03

  • Next message: Ingmar Jørgensen: "Re: How to get info on installed CDROM/DVD Drives?"
    Date: Mon, 29 Dec 2003 09:34:10 +0200
    
    

    hi guys ...

    i wanna write some hook functions ... i have already written a keyboard
    hook it works well ... and i wanna write another one (WH_GETMESSAGE) ...

    windows sdk help says,

    LRESULT CALLBACK GetMsgProc(

        int code, // hook code
        WPARAM wParam, // removal flag
        LPARAM lParam // address of structure with message
       );

    and ... it also says for LPARAM, "lParam : Points to an MSG structure
    that contains details about the message. "

    and my hook function is below

    function GlobalMessagesHook(code: integer; wParam: word; lParam:
    longword): longword; stdcall;
    begin
        if code<0 then begin

    GlobalKeyBoardHook:=CallNextHookEx(CurrentHook,code,wParam,lparam);
           Exit;
        end;

        // and another codes related with messages
        // ......
        // ......

        CallNextHookEx(CurrentHook,code,wParam,lparam);
        GlobalKeyBoardHook:=0;
        Exit;
    end;

    the question is,

    how can i obtain message info from LPARAM ... or is my definition wrong
    ? what should i do exactly to obtain message information (window's
    handle, message type, message's lparam, wparam, etc ...)

    thanks in advance,
    regards Ozgur
    ============================================
    Özgür TUĞRUL

    Application & System Programmer
    Ass. Database & System Adm.
    Statistician & Research Ass.

    Hacettepe University Office of the Registrar
    Data Processing Department - System Room

    oztugrul@hacettepe.edu.tr
    http://yunus.hacettepe.edu.tr/~oztugrul/
    ============================================


  • Next message: Ingmar Jørgensen: "Re: How to get info on installed CDROM/DVD Drives?"