I am trying to modify an old plugin to create a new one (in C++ and Visual Studio 2019). When I compile I get the following error marking TEXT in red.
E0144: A value of type "const wchar_t *" cannot be used to initialize an entity of type LPTSTR
LPTSTR process_name = TEXT("rFactor2.exe");
module_address = GetModuleBase(process_name, pID);
I investigated and saw a similar post suggesting this:
LPTSTR process_name = foo(TEXT("rFactor2.exe"));
And now I get the following error:
E0020: identifier "foo" is not defined
Could someone tell me how can I create the variable in LPTSTR format (it's the type that GetModuleBase
expects)?