I am introducing myself to using Hooks in Win32 C++ (specifically KeyboardHooks) & I have an issue & a question.
First off, I am trying to just create/declare a HHook object, but when I do Microsoft Visual C++ gives a compiler error saying:
[font="Consolas"][size="1"][font="Consolas"][size="1"]c:\users\soribo\desktop\c++ programming\visual c++ programming\testhhook\testhhook\testhhook.cpp(7): error C2146: syntax error : missing ';' before identifier 'keyboardHook'
1>c:\users\soribo\desktop\c++ programming\visual c++ programming\testhhook\testhhook\testhhook.cpp(7): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\soribo\desktop\c++ programming\visual c++ programming\testhhook\testhhook\testhhook.cpp(7): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
[/font][/font][/quote]
This is the line of code that generates this error:
HHook keyboardHook;
What windows library do I need to include to use the HHook class? I have done #include <windows.h>
My other question is, to use these hooks do I need UAC?