diff --git a/d3d11game_win32/Main.cpp b/d3d11game_win32/Main.cpp index fd87f53..3681975 100644 --- a/d3d11game_win32/Main.cpp +++ b/d3d11game_win32/Main.cpp @@ -105,8 +105,6 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, g_game.reset(); - CoUninitialize(); - return static_cast(msg.wParam); } diff --git a/d3d11game_win32_dr/Main.cpp b/d3d11game_win32_dr/Main.cpp index 519bd00..5560e25 100644 --- a/d3d11game_win32_dr/Main.cpp +++ b/d3d11game_win32_dr/Main.cpp @@ -105,8 +105,6 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, g_game.reset(); - CoUninitialize(); - return static_cast(msg.wParam); } diff --git a/d3d12game_win32/Main.cpp b/d3d12game_win32/Main.cpp index 1e566e0..9852068 100644 --- a/d3d12game_win32/Main.cpp +++ b/d3d12game_win32/Main.cpp @@ -46,8 +46,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, if (FAILED(CoInitializeEx(nullptr, COINITBASE_MULTITHREADED))) return 1; #else - Microsoft::WRL::Wrappers::RoInitializeWrapper initialize(RO_INIT_MULTITHREADED); - if (FAILED(initialize)) + if (FAILED(RoInitialize(COINITBASE_MULTITHREADED))) return 1; #endif diff --git a/d3d12game_win32_dr/Main.cpp b/d3d12game_win32_dr/Main.cpp index 43da223..1aa1d68 100644 --- a/d3d12game_win32_dr/Main.cpp +++ b/d3d12game_win32_dr/Main.cpp @@ -46,8 +46,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, if (FAILED(CoInitializeEx(nullptr, COINITBASE_MULTITHREADED))) return 1; #else - Microsoft::WRL::Wrappers::RoInitializeWrapper initialize(RO_INIT_MULTITHREADED); - if (FAILED(initialize)) + if (FAILED(RoInitialize(COINITBASE_MULTITHREADED))) return 1; #endif