61 lines
1.8 KiB
C
61 lines
1.8 KiB
C
/*
|
|
* Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved.
|
|
*
|
|
* This file is part of System Informer.
|
|
*
|
|
* Authors:
|
|
*
|
|
* dmex 2016-2026
|
|
*
|
|
*/
|
|
|
|
#include "onlnchk.h"
|
|
|
|
HRESULT CALLBACK TaskDialogErrorProc(
|
|
_In_ HWND WindowHandle,
|
|
_In_ UINT WindowMessage,
|
|
_In_ WPARAM wParam,
|
|
_In_ LPARAM lParam,
|
|
_In_ LONG_PTR dwRefData
|
|
)
|
|
{
|
|
PUPLOAD_CONTEXT context = (PUPLOAD_CONTEXT)dwRefData;
|
|
|
|
switch (WindowMessage)
|
|
{
|
|
case TDN_NAVIGATED:
|
|
{
|
|
//if (context->TaskbarListClass)
|
|
//{
|
|
// PhTaskbarListSetProgressValue(context->TaskbarListClass, context->DialogHandle, 1, 1);
|
|
// PhTaskbarListSetProgressState(context->TaskbarListClass, context->DialogHandle, PH_TBLF_ERROR);
|
|
//}
|
|
}
|
|
break;
|
|
}
|
|
|
|
return S_OK;
|
|
}
|
|
|
|
VOID VirusTotalShowErrorDialog(
|
|
_In_ PUPLOAD_CONTEXT Context
|
|
)
|
|
{
|
|
TASKDIALOGCONFIG config;
|
|
|
|
memset(&config, 0, sizeof(TASKDIALOGCONFIG));
|
|
config.cbSize = sizeof(TASKDIALOGCONFIG);
|
|
config.dwFlags = TDF_USE_HICON_MAIN | TDF_ALLOW_DIALOG_CANCELLATION | TDF_CAN_BE_MINIMIZED | TDF_ENABLE_HYPERLINKS;
|
|
config.dwCommonButtons = TDCBF_CLOSE_BUTTON;
|
|
config.hMainIcon = PhGetApplicationIcon(FALSE, PhGetWindowDpi(Context->DialogHandle));
|
|
config.pszWindowTitle = PhaFormatString(L"Uploading %s...", PhGetStringOrEmpty(Context->BaseFileName))->Buffer;
|
|
config.pszMainInstruction = PhaFormatString(L"Error uploading %s...", PhGetStringOrEmpty(Context->BaseFileName))->Buffer;
|
|
config.pszContent = PhGetStringOrEmpty(Context->ErrorString);
|
|
|
|
config.cxWidth = 200;
|
|
config.lpCallbackData = (LONG_PTR)Context;
|
|
config.pfCallback = TaskDialogErrorProc;
|
|
|
|
PhTaskDialogNavigatePage(Context->DialogHandle, &config);
|
|
}
|