Click here to Skip to main content
12,697,178 members (25,686 online)
Click here to Skip to main content

Stats

1.2M views
11.4K downloads
318 bookmarked
Posted

Hooks and DLLs

, 31 Mar 2001
There is a lot of confusion about how to set up and use global hook functions. This essay attempts to clear up some of these issues.
HOTT
hook
hook.dsp
hook.dsw
MouseHook
MouseHook.dsp
res
captured.cur
fleeing.cur
hook.ico
#ifndef _DEFINED_44E531B1_14D3_11d5_A025_006067718D04
#define _DEFINED_44E531B1_14D3_11d5_A025_006067718D04
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#ifdef _COMPILING_44E531B1_14D3_11d5_A025_006067718D04
#define LIBSPEC __declspec(dllexport)
#else
#define LIBSPEC __declspec(dllimport)
#endif // _COMPILING_44E531B1_14D3_11d5_A025_006067718D04
   LIBSPEC BOOL setMyHook(HWND hWnd);
   LIBSPEC BOOL clearMyHook(HWND hWnd);
#undef LIBSPEC
#ifdef __cplusplus
}
#endif // __cplusplus
#define UWM_MOUSEMOVE_MSG _T("UWM_MOUSEMOVE_MSG-44E531B1_14D3_11d5_A025_006067718D04")

// These declarations are because the latest SDK isn't installed...
#ifndef GET_X_LPARAM
#define GET_X_LPARAM(p) ((int)(short)LOWORD(p))
#define GET_Y_LPARAM(p) ((int)(short)HIWORD(p))
#endif

#endif // _DEFINED_44E531B1_14D3_11d5_A025_006067718D04

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Joseph M. Newcomer
Retired
United States United States
PhD, Computer Science, Carnegie Mellon University, 1975
Certificate in Forensic Science and the Law, Duquesne University, 2008

Co-Author, [i]Win32 Programming[/i]

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170118.1 | Last Updated 1 Apr 2001
Article Copyright 2001 by Joseph M. Newcomer
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid