Results 1 to 2 of 2

Thread: WH_CALLWNDPROC hook *RESOLVED!*

  1. #1

    Thread Starter
    Hyperactive Member jovton's Avatar
    Join Date
    Nov 2000
    Location
    South Africa
    Posts
    266

    Cool WH_CALLWNDPROC hook *RESOLVED!*

    Hello.

    I'm new to C#. I want to implement the WH_CALLWNDPROC hook on local thread. But I don't know how I'm going to cast the System.IntPtr lParam parameter of the CallWndProc function to the CWPDATA structure. If anyone knows what I'm talking about, can you help me out? Thanks.
    Last edited by jovton; Apr 19th, 2004 at 03:19 PM.
    jovton

  2. #2

    Thread Starter
    Hyperactive Member jovton's Avatar
    Join Date
    Nov 2000
    Location
    South Africa
    Posts
    266
    Nevermind. Figured it out meself.

    Code:
    public int HookProcedure(int code, IntPtr wParam, IntPtr lParam)
    {
    	CwpStruct newLParam = (CwpStruct) System.Runtime.InteropServices.Marshal.PtrToStructure(lParam, typeof(CwpStruct));
    
    	// blah blah blah blah ...
    
    }
    Last edited by jovton; Apr 19th, 2004 at 03:22 PM.
    jovton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width