< prev index next >

src/jdk.incubator.jpackage/windows/native/libjpackage/IconSwap.cpp

Print this page

        

*** 81,92 **** void PrintError() { LPVOID message = NULL; DWORD error = GetLastError(); ! if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | ! FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) & message, 0, NULL) != 0) { printf("%S", (LPTSTR) message); LocalFree(message); } --- 81,93 ---- void PrintError() { LPVOID message = NULL; DWORD error = GetLastError(); ! if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER ! | FORMAT_MESSAGE_FROM_SYSTEM ! | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) & message, 0, NULL) != 0) { printf("%S", (LPTSTR) message); LocalFree(message); }
*** 182,194 **** } free(lpid); CloseHandle(icon); ! if (!UpdateResource(update, RT_GROUP_ICON, ! MAKEINTRESOURCE(1), language, &lpgid[0], ! (sizeof (WORD) * 3) + (sizeof (GRPICONDIRENTRY) * lpgid->idCount))) { free(lpgid); PrintError(); return false; } --- 183,195 ---- } free(lpid); CloseHandle(icon); ! if (!UpdateResource(update, RT_GROUP_ICON, MAKEINTRESOURCE(1), ! language, &lpgid[0], (sizeof (WORD) * 3) ! + (sizeof (GRPICONDIRENTRY) * lpgid->idCount))) { free(lpgid); PrintError(); return false; }
< prev index next >