Thanks! Worked flawless with CreateFileW, also with const char* instead of const wchar_t* it made me run into problems when I would need to change char in all other functions and it ended up with, that it said it cannot convert wchar once again even if it wasn't there? Anyways worked fine with CreateFileW. clanmjcs code had undefined strings?
Unless you want to convert between different char types in your program, I suggest you just use the function/struct that takes whatever form of string you're using.
The "normal" name for functions/structs take TCHARs. Add an 'A' to the end for the char version, and add a 'W' to the end for the wchar_t version: