const wchar_t* to wchar_t* error

Hey,

i always have problems with those wchar things. Hopefully someone of you can help me with this.

I got the code from here:https://easyhook.github.io/tutorials/nativeremotehook.html So i think, it may be just a visual studio thing.

WCHAR* dllToInject = L"..\\Debug\\BeepHook.dll";

and this is the error message:
"const wchar_t [22]" kann nicht in "WCHAR *" konvertiert werden
If that is actually the erroneous line you should add const before the type:

const WCHAR* dllToInject = L"..\\Debug\\BeepHook.dll";

And the error should go away.

If dllToInject needs to be non const you can write it like so:

WCHAR dllToInject[] = L"..\\Debug\\BeepHook.dll";
By the way, and I say this as a non-native English speaker, if you want to maximize your chances of getting help in English-speaking communities, install your system and all your tools in English. I can guess what that error message is saying, but I shouldn't have to guess.
Thank you both :D
@coder777 works perfectly

@helios: i'll take this into account next time ;)
Topic archived. No new replies allowed.