Changed calling updater thread.
This commit is contained in:
@@ -26,7 +26,8 @@ void FillVersionStructure(Version& ver, const std::wstring& str);
|
||||
std::vector<std::wstring> Split(const std::wstring& s, wchar_t delim);
|
||||
std::wstring ConvertUtf8ToWide(const std::string& str);
|
||||
|
||||
DWORD WINAPI Updater(LPVOID)
|
||||
//DWORD WINAPI Updater(LPVOID)
|
||||
UINT WINAPI Updater(LPVOID)
|
||||
{
|
||||
LOG_TO_FILE(L"Entering the %s() function", TEXT(__FUNCTION__));
|
||||
|
||||
@@ -115,7 +116,8 @@ DWORD WINAPI Updater(LPVOID)
|
||||
|
||||
LOG_TO_FILE(L"[UPDT] Exit from the %s() function", TEXT(__FUNCTION__));
|
||||
|
||||
return 0;
|
||||
//return 0;
|
||||
_endthreadex(0);
|
||||
}
|
||||
|
||||
bool GetLatestRelease(const std::wstring& urn)
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
// updater.h
|
||||
//
|
||||
#pragma once
|
||||
DWORD WINAPI Updater(LPVOID);
|
||||
//DWORD WINAPI Updater(LPVOID);
|
||||
UINT WINAPI Updater(void*);
|
||||
|
||||
@@ -25,6 +25,7 @@ WCHAR szClass[MAX_LOADSTRING]; // Window's class
|
||||
WCHAR szWinTitle[256];
|
||||
WCHAR szWinClass[256];
|
||||
HANDLE hHeap = NULL, hUpdater = NULL;
|
||||
UINT dwUpdaterID = 0;
|
||||
HHOOK hMouseHook = NULL, hKbdHook = NULL; // Hook's handles
|
||||
HICON hIcon = NULL;
|
||||
HMENU hMenu = NULL, hPopup = NULL;
|
||||
@@ -278,7 +279,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
LOG_TO_FILE(L"%s(%d): Checking for updates is enabled, fCheckUpdates = %s", TEXT(__FUNCTION__), __LINE__, fCheckUpdates ? L"True" : L"False");
|
||||
|
||||
hUpdater = CreateThread(NULL, 0, &Updater, nullptr, 0, nullptr);
|
||||
//hUpdater = CreateThread(NULL, 0, &Updater, nullptr, 0, nullptr);
|
||||
hUpdater = (HANDLE)_beginthreadex(NULL, 0, &Updater, NULL, 0, &dwUpdaterID);
|
||||
if (NULL == hUpdater)
|
||||
{
|
||||
DWORD dwLastError = GetLastError();
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <wininet.h>
|
||||
#include <shellapi.h>
|
||||
#include <CommCtrl.h>
|
||||
#include <process.h>
|
||||
|
||||
// VerionInfo header file
|
||||
#include "VersionInfo.h"
|
||||
|
||||
Reference in New Issue
Block a user