Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6014039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:38:03+00:00 2026-05-23T02:38:03+00:00

I am introducing myself to using Hooks in Win32 C++ (specifically KeyboardHooks) & I

  • 0

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:

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

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?

EDIT: With more code:

// TestHHook.cpp : Defines the entry point for the application.
//

     #include <windows.h>
#include "stdafx.h"
#include "TestHHook.h"

static HHook keyboardHook;
#define MAX_LOADSTRING 100

// Global Variables:
HINSTANCE hInst;                                // current instance
TCHAR szTitle[MAX_LOADSTRING];                  // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING];            // the main window class name

// Forward declarations of functions included in this code module:
ATOM                MyRegisterClass(HINSTANCE hInstance);
BOOL                InitInstance(HINSTANCE, int);
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:38:04+00:00Added an answer on May 23, 2026 at 2:38 am

    You are using a case sensitive language. It is HHOOK, not HHook.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just introducing myself to the basic differences between Silverlight 3 and it's predecessor.
I have been using gvim at work for a year or so, just at
What experience have you had with introducing a Ribbon style control to legacy MFC
How would you go about introducing acceptance tests into a team using the .NET
Is there any documentation about introducing jBoss seam to an old Hibernate/JSF project? Have
I'm busy introducing myself to jQuery by implementing a little system where onmouseover on
I've been introducing myself to LinqToSQL lately through a poorly-made project at work. I'm
I have set myself upon a journey to educate my coworkers (all have accepted
Something I have found myself doing often lately is declaring typedefs relevant to a
I'm introducing myself in the java world and springsource seems to be the most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.