C++ errors need help...
Hello MPGH i work with C++ and im ok with fixing issuse but same time learning. i came with an error with a project my friend gave me and seem cant find his issuse.
Error 1 error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'const char [11]' to 'LPCWSTR'
Error 2 error C2664: 'PlaySoundW' : cannot convert parameter 1 from 'const char [11]' to 'LPCWSTR'
Error 3 error C2664: 'SetConsoleTitleW' : cannot convert parameter 1 from 'const char [37]' to 'LPCWSTR'
Error1 code:
Code:
return;
HMODULE library = ::LoadLibrary("dwmapi.dll");
bool result = false;
if (library)
{
DwmEnableComposition_t func = (DwmEnableComposition_t)GetProcAddress(library, "DwmEnableComposition");
if (func)
{
BOOL enabled = FALSE;
func(DWM_EC_DISABLECOMPOSITION);
}
}
}
Error2 code:
Code:
bool SetAchievement( const char *pchName ) {
Logger("ISteamUserStats006", "SetAchievement");
Logger("ISteamUserStats006", (char*)pchName);
if (StatBackend::GetInt(pchName) == 0) {
PlaySound("miscom.wav", NULL, SND_ASYNC | SND_FILENAME);
}
Logger("ISteamUserStats006", "SetAchievement_doing");
StatBackend::Set(pchName, 1);
return true;
}
Error3 code:
Code:
int DOinit(void *unused)
{
unused=0; //
AllocConsole() ;
AttachConsole( GetCurrentProcessId() );
freopen( "CON", "w", stdout ) ;
SetConsoleTitle( "API Debug Console" );
return 0;
}
forgot to change Character set to muit byte