summaryrefslogtreecommitdiffstats
path: root/src/lib/platform/MSWindowsHookResource.h
blob: b66c4b8cc153ddcb105e699a5ae876c36558ec6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

class WindowsHookResource
{
public:
    explicit WindowsHookResource();
    ~WindowsHookResource();

    bool set(int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId);
    bool unset();

    bool is_set() const;
    operator HHOOK() const;

private:
    HHOOK _hook;
};