Click here to Skip to main content
15,893,588 members
Articles / Programming Languages / C++

Mouse and KeyBoard Hooking utility with VC++

Rate me:
Please Sign up or sign in to vote.
4.93/5 (38 votes)
21 Mar 2010CPL4 min read 182.7K   27.1K   146  
Test Automation software's code revealed with the help of mouse and keyboard hooking!!!
#ifndef _MOUSE_EVENT_RECORD_H_
#define _MOUSE_EVENT_RECORD_H_
//#if _MSC_VER > 1000
//#pragma once
//#endif

#define LIBSPEC __declspec(dllexport)

   LIBSPEC BOOL InstallHook(HWND hWnd);
   LIBSPEC BOOL UnInstallHook(HWND hWnd);
#undef LIBSPEC

#define UWM_MOUSEMOVE_MSG ("UWM_MOUSEMOVE_USER_MSG")
#define UWM_MOUSELBUTTONUP_MSG ( "UWM_MOUSELBUTTONUP_USER_MSG" )
#define UWM_MOUSELBUTTONDOWN_MSG ( "UWM_MOUSELBUTTONDOWN_USER_MSG" )
#define UWM_MOUSERBUTTONUP_MSG ( "UWM_MOUSERBUTTONUP_USER_MSG" )
#define UWM_MOUSERBUTTONDOWN_MSG ( "UWM_MOUSERBUTTONDOWN_USER_MSG" )
#define UWM_MOUSELDBCLICK_MSG ( "UWM_MOUSERBUTTONDOWN_USER_MSG" )

#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, along with any associated source code and files, is licensed under The Common Public License Version 1.0 (CPL)


Written By
Software Developer (Senior) Philips HealthCare
India India
I am always looking for new technical challenges.
If you face it, contact me, I will solve it.

Comments and Discussions