Answer the question
In order to leave comments, you need to log in
I am writing a keylogger in c++ and met with errors. How to fix them?
the code itself https://pastebin.com/zhNkGcs1
here are the errors
how to fix them?
Answer the question
In order to leave comments, you need to log in
Where the WinAPI functions have a xxxWSTR type parameter as input, it means that it expects wchar_t from you, and not a regular char.
For most WinAPI functions that work with strings, there are 2 versions of the same function, one takes char, the other takes wchar_t. Windows uses wchar internally, so it makes sense to always use wchar in your programs to avoid additional conversions.
Use wchar instead of char, or compile to Multibyte Encoding instead of Unicode (I don't recommend doing this, but it will work).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question