Keylogger (SOLVED)

Pages: 123
Are you running your IDE with limited privileges? %COMPUTERNAME% should be accessible from most accounts.
I am not sure, I am running the administrator user. System is Windows 8 pro 64bit
That shouldn't matter anyway. Removing the '!' breaks that check anyway. We are only concerned about the last error if GetComputerName fails in which case it will return 0. You are saying the computer name does NOT display if you leave the '!' in?
Hey! I tried uncommenting the rest of the code and viola!!! It worked!!!!!!!!!!!!! Thank yooou soo much man I owe you ;D
Can I thumb you up or something? I really want to repay you.
Sure, I'm glad I could help.
Just for clarification, my computer name kept showing up even when I removed the "!" but it was "garbage". After I tried uncommenting it worked. I think it was fixed long ago when I changed wchar_t to TCHAR.
Turns out I mistakenly put my username instead of the "%s" so the problem isn't solved yet but I have made some interesting discovery. "pcName " prints out my name when I use wcout instead of cout, does that make a difference?
I read about it in google and I seem to have unicode turned on and thats why I was getting the numbers in cout. How to fix this though?
Last edited on
You can only fix it compiling for ascii, or explicitly using wcout, or explicitly using GetComputerNameA with char's.
Last edited on
How to fix this though?

Project Properties -> General -> Project Defaults -> Character Set.
Thanks Again! :D
Topic archived. No new replies allowed.
Pages: 123