Skip to content

Commit

Permalink
Fix Windows build errors introduced in D2765
Browse files Browse the repository at this point in the history
Summary:
See core issue #12386:
bitcoin/bitcoin#12386

Backport of core PR12416

Test Plan:
  make check
Build the windows binaries

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: schancel

Differential Revision: https://reviews.bitcoinabc.org/D2779
  • Loading branch information
practicalswift authored and Fabcien committed Apr 5, 2019
1 parent 4c92f4c commit 193d2b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ int main(int argc, char *argv[]) {
WinShutdownMonitor::registerShutdownBlockReason(
QObject::tr("%1 didn't yet exit safely...")
.arg(QObject::tr(PACKAGE_NAME)),
static_cast<HWND>(app.getMainWinId()));
(HWND)app.getMainWinId());
#endif
app.exec();
app.requestShutdown(config);
Expand Down
5 changes: 2 additions & 3 deletions src/qt/winshutdownmonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType,
void WinShutdownMonitor::registerShutdownBlockReason(const QString &strReason,
const HWND &mainWinId) {
typedef BOOL(WINAPI * PSHUTDOWNBRCREATE)(HWND, LPCWSTR);
PSHUTDOWNBRCREATE shutdownBRCreate =
static_cast<PSHUTDOWNBRCREATE>(GetProcAddress(
GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate"));
PSHUTDOWNBRCREATE shutdownBRCreate = (PSHUTDOWNBRCREATE)GetProcAddress(
GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate");
if (shutdownBRCreate == nullptr) {
qWarning() << "registerShutdownBlockReason: GetProcAddress for "
"ShutdownBlockReasonCreate failed";
Expand Down

0 comments on commit 193d2b9

Please sign in to comment.