A
A
AramBaram2021-07-29 00:08:29
C++ / C#
AramBaram, 2021-07-29 00:08:29

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 6101c73e86864762793659.png

how to fix them?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2021-07-29
@AramBaram

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.

A
Alexander Ananiev, 2021-07-29
@SaNNy32

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 question

Ask a Question

731 491 924 answers to any question