1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

osinterface: use FAILED macro to check for success of CoInitializeEx / SHGetMalloc.

This commit is contained in:
Patrick Wijnings
2014-06-13 14:44:40 +02:00
parent 521e868b6f
commit 4485e3dd72

View File

@@ -394,14 +394,14 @@ char* osinterface_open_directory_browser(char *title) {
LPMALLOC lpMalloc;
// Initialize COM
if (CoInitializeEx(0, COINIT_APARTMENTTHREADED) != S_OK) {
if (FAILED(CoInitializeEx(0, COINIT_APARTMENTTHREADED))) {
MessageBox(NULL, _T("Error opening browse window"), _T("ERROR"), MB_OK);
CoUninitialize();
return 0;
}
// Get a pointer to the shell memory allocator
if (SHGetMalloc(&lpMalloc) != S_OK) {
if (FAILED(SHGetMalloc(&lpMalloc))) {
MessageBox(NULL, _T("Error opening browse window"), _T("ERROR"), MB_OK);
CoUninitialize();
return 0;