Pass method in a class as argument
<p>I have a class like this</p>

<pre><code>class Keyboard
{
public:
    Keyboard(void);
    ~Keyboard(void);
    void SetHook(HINSTANCE hInstance);
    LRESULT CALLBACK keyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam);
};


LRESULT CALLBACK Keyboard::keyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
    bool bControlKeyDown=0;
    bool caps = GetKeyState(VK_CAPITAL) &lt; 0;

...

void Keyboard::SetHook(HINSTANCE hInstance)
{
    KeyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, Keyboard::keyboardHookProc, hInstance, NULL);
}
</code></pre>

<p>But the statement </p>

<pre><code>KeyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, Keyboard::keyboardHookProc, hInstance, NULL);
</code></pre>

<p>Result in compile error </p>

<pre><code>Error   7   error C3867: 'Keyboard::keyboardHookProc': function call missing argument list; use '&amp;Keyboard::keyboardHookProc' to create a pointer to member
</code></pre>

<p>If I change to '&amp;Keyboard::keyboardHookProc' it also error, also when I cast to '(HOOKPROC) &amp;Keyboard::keyboardHookProc' it also error</p>

<p>Anyone please help</p>
