Click here to Skip to main content
15,920,687 members
Home / Discussions / C#
   

C#

 
GeneralAbout shared assembly. Pin
Feng Qin24-Jul-02 21:40
Feng Qin24-Jul-02 21:40 
GeneralRe: About shared assembly. Pin
James T. Johnson24-Jul-02 23:54
James T. Johnson24-Jul-02 23:54 
GeneralRe: About shared assembly. Pin
Feng Qin25-Jul-02 0:03
Feng Qin25-Jul-02 0:03 
GeneralRe: About shared assembly. Pin
James T. Johnson25-Jul-02 0:08
James T. Johnson25-Jul-02 0:08 
GeneralSys-wide keyboard hook Pin
Anonymous24-Jul-02 19:14
Anonymous24-Jul-02 19:14 
GeneralRe: Sys-wide keyboard hook Pin
Luis Alonso Ramos24-Jul-02 21:02
Luis Alonso Ramos24-Jul-02 21:02 
GeneralRe: Sys-wide keyboard hook Pin
Alex Korchemniy25-Jul-02 7:20
Alex Korchemniy25-Jul-02 7:20 
GeneralRe: Sys-wide keyboard hook Pin
Luis Alonso Ramos25-Jul-02 10:57
Luis Alonso Ramos25-Jul-02 10:57 
So it's C# after all?

See the docs for SetWindowsHookEx here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookfunctions/setwindowshookex.asp[^]

the hMod (third) parameter contains the module handle of the module (EXE or DLL, must be DLL if systemwide) that contains the hook procedure.

I'd recommend you to write the DLL with the hook function in straigth Win32 SDK code, so it is smaller (imagine having to load all .NET runtimes in every process??) Export two routines to start and stop the hook, and from the hook procedure you could send a message to your app's window (written in C#).

-- LuisR

──────────────
  Luis Alonso Ramos
  Chihuahua, Mexico
  www.luisalonsoramos.com

"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
GeneralCopy Constructor Pin
Johnny Zee24-Jul-02 16:54
sussJohnny Zee24-Jul-02 16:54 
GeneralRe: Copy Constructor Pin
James T. Johnson24-Jul-02 18:08
James T. Johnson24-Jul-02 18:08 
GeneralRe: Copy Constructor Pin
Johnny Zee25-Jul-02 2:27
sussJohnny Zee25-Jul-02 2:27 
GeneralRe: Copy Constructor Pin
albean28-Jul-02 14:22
albean28-Jul-02 14:22 
GeneralRe: Copy Constructor Pin
James T. Johnson28-Jul-02 16:01
James T. Johnson28-Jul-02 16:01 
GeneralConfigurationSettings Pin
Steve Severance24-Jul-02 13:12
Steve Severance24-Jul-02 13:12 
GeneralRe: ConfigurationSettings Pin
James T. Johnson24-Jul-02 16:18
James T. Johnson24-Jul-02 16:18 
GeneralRe: ConfigurationSettings Pin
jparsons25-Jul-02 2:45
jparsons25-Jul-02 2:45 
GeneralRe: ConfigurationSettings Pin
James T. Johnson25-Jul-02 2:50
James T. Johnson25-Jul-02 2:50 
GeneralNamespace Hell Pin
stephen woolhead24-Jul-02 13:12
stephen woolhead24-Jul-02 13:12 
GeneralRe: Namespace Hell Pin
James T. Johnson24-Jul-02 16:08
James T. Johnson24-Jul-02 16:08 
GeneralRe: Namespace Hell Pin
stephen woolhead24-Jul-02 22:13
stephen woolhead24-Jul-02 22:13 
GeneralRe: Namespace Hell Pin
James T. Johnson25-Jul-02 0:16
James T. Johnson25-Jul-02 0:16 
GeneralRe: Namespace Hell Pin
jparsons25-Jul-02 2:49
jparsons25-Jul-02 2:49 
GeneralProblems with ListView and columns Pin
Luis Alonso Ramos24-Jul-02 9:53
Luis Alonso Ramos24-Jul-02 9:53 
GeneralRe: Problems with ListView and columns Pin
leppie24-Jul-02 20:44
leppie24-Jul-02 20:44 
GeneralRe: Problems with ListView and columns Pin
Luis Alonso Ramos24-Jul-02 21:01
Luis Alonso Ramos24-Jul-02 21:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.