Hook

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Omar

    #1

    Hook

    Hi!!

    How can i make a global keyboard hook in c#??

    thanks...


  • Vadym Stetsyak

    #2
    Re: Hook

    write standard hook with the help of Win32 API & then use obtained DLL
    through a C# wrapper that will work with unmanaged DLL thorough P/Invoke

    "Omar" <solskjaer_sm@h otmail.com> wrote in message
    news:u62aNRptDH A.2408@tk2msftn gp13.phx.gbl...[color=blue]
    > Hi!!
    >
    > How can i make a global keyboard hook in c#??
    >
    > thanks...
    >
    >[/color]


    Comment

    • Omar

      #3
      Re: Hook

      Hi Vadym!!
      [color=blue]
      > write standard hook with the help of Win32 API & then use obtained DLL
      > through a C# wrapper that will work with unmanaged DLL thorough P/Invoke
      >[/color]

      Exactly how can i do this?? i think you talk about programming in c++...i´m
      novice in this...


      Comment

      • Tom Shelton

        #4
        Re: Hook

        On 2003-11-29, Omar <solskjaer_sm@h otmail.com> wrote:[color=blue]
        > Hi Vadym!!
        >[color=green]
        >> write standard hook with the help of Win32 API & then use obtained DLL
        >> through a C# wrapper that will work with unmanaged DLL thorough P/Invoke
        >>[/color]
        >
        > Exactly how can i do this?? i think you talk about programming in c++...i´m
        > novice in this...
        >
        >[/color]

        That's exactly what he is saying. You can't write a global hook in C#.
        The hook proc has to reside in a standard dll - which .NET is not
        capable of creating. You will need to use a language that does support
        this to write the actuall hook, and then you can wrap the dll in C#
        using P/Invoke.

        --
        Tom Shelton
        MVP [Visual Basic]

        Comment

        Working...