CPPGameLauncher: "Erro! Failed to create window"
Hello, I`m trying to compile it, after solving all dependencies I’m receiving this error

'CPPGameLauncher.exe' (Win32): Loaded 'D:\DEV\CPPGameLauncher\x64\Debug\CPPGameLauncher.exe'. Symbols loaded. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\cryptsp.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.18362.778_none_17b1aa466d9fc986\GdiPlus.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'D:\DEV\CPPGameLauncher\x64\Debug\zlibd1.dll'. Symbols loaded. 'CPPGameLauncher.exe' (Win32): Loaded 'D:\DEV\CPPGameLauncher\x64\Debug\libcurl-d.dll'. Symbols loaded. 'CPPGameLauncher.exe' (Win32): Loaded 'D:\DEV\CPPGameLauncher\x64\Debug\libcrypto-1_1-x64.dll'. Symbols loaded. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\Wldap32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\secur32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\sspicli.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\mswsock.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\WindowsCodecs.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\DWrite.dll'. Exception thrown at 0x00007FFD83EDA799 in CPPGameLauncher.exe: Microsoft C++ exception: std::logic_error at memory location 0x000000EF7D78F408. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\TextInputFramework.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\CoreUIComponents.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. 'CPPGameLauncher.exe' (Win32): Unloaded 'C:\Windows\System32\WinTypes.dll' 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\iertutil.dll'. The thread 0x5a64 has exited with code 1 (0x1). The thread 0x628 has exited with code 0 (0x0). The thread 0x4658 has exited with code 0 (0x0). The thread 0x3664 has exited with code 0 (0x0). The thread 0x551c has exited with code 0 (0x0). The thread 0x6830 has exited with code 0 (0x0). The program '[5328] CPPGameLauncher.exe' has exited with code 0 (0x0).
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 2
- Comments: 24
not works… here.
This specific issue is fixed by initializing the window class with zeroes:
WNDCLASSEXW wcex = {0};However after doing that the window simply won’t update (will show a black windows if you try to call it as well)You can run on debug mode and see whats happen when the debugger is present? I didn’t tested on x64 platform, sorry !
Already changes. same result of the problem above.
How I can fix it ?
It solved this specific issue for me. Are you still receiving the “Failed to create window”? Anyway, the launcher still wont open due to a read access violation in void Main::paint, more specifically in
gCache->g->DrawCachedBitmap(gCache->backgroundCachedBitmap.get(), 0, 0);