Cannot reboot while GUI_VisualStudio.exe is runnin |
Post Reply |
Author | |
calvi
Groupie Joined: 20 March 2004 Location: United Kingdom Status: Offline Points: 43 |
Post Options
Thanks(0)
Posted: 28 August 2021 at 10:49am |
GUI_VisualStudio.exe built with v19.3.0 using VS2019 16.11.2 prevents Windows 10, 21H1 from rebooting and locks itself up. This can be fixed by editing XTPHookManager.cpp and inserting the following code at the start of CXTPHookManager::HookWndProc: if (message == WM_ENDSESSION) return 0; A variation of this, seen in my own program, is that the following code later in that function results in an out of memory exception which also locks up: pSink = XTPHookManager()->Lookup(hWnd); That fix cures both problems.
|
|
calvi
Groupie Joined: 20 March 2004 Location: United Kingdom Status: Offline Points: 43 |
Post Options
Thanks(0)
|
This bug is also present in v20.1.0.
|
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 299 |
Post Options
Thanks(0)
|
Hello, During normal application closing called CXTPWinApp::ExitInstance() function. All global codejock library variables should be removed in XTPShutdown() function that called from CXTPWinApp::ExitInstance().Before XTPShutdown() call all dialogs or frames windows should be closed. Global variables already not used and can be deleted. During application closing with CFrameWnd::OnEndSession() function system will called pApp->ExitInstance() function that remove all global variables that currently used in CFrameWnd derived class, after this you get problem that your discribed. This document discribed Restart Manager API https://docs.microsoft.com/en-us/windows/win32/rstmgr/guidelines-for-applications. I think you need to get WM_CLOSE message during shutdown and application will be closed without problem. Regards, Artem Gontarenko
|
|
calvi
Groupie Joined: 20 March 2004 Location: United Kingdom Status: Offline Points: 43 |
Post Options
Thanks(0)
|
Thanks for your suggestion, but GUI_VisualStudio is not my code!
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |