Skip to content

Commit 8f0c867

Browse files
committed
OnlineChecks: Fix copyright headers, Update VirusTotal dialog text.
1 parent f44432d commit 8f0c867

File tree

6 files changed

+22
-44
lines changed

6 files changed

+22
-44
lines changed

plugins/OnlineChecks/page1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Process Hacker Plugins -
3-
* Update Checker Plugin
3+
* Online Checks Plugin
44
*
55
* Copyright (C) 2016 dmex
66
*
@@ -75,4 +75,4 @@ VOID ShowVirusTotalUploadDialog(
7575
config.lpCallbackData = (LONG_PTR)Context;
7676

7777
SendMessage(Context->DialogHandle, TDM_NAVIGATE_PAGE, 0, (LPARAM)&config);
78-
}
78+
}

plugins/OnlineChecks/page2.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Process Hacker Plugins -
3-
* Update Checker Plugin
3+
* Online Checks Plugin
44
*
55
* Copyright (C) 2016 dmex
66
*
@@ -24,12 +24,12 @@
2424

2525
static TASKDIALOG_BUTTON TaskDialogButtonArray[] =
2626
{
27-
{ IDOK, L"Upload file" },
28-
{ IDRETRY, L"Reanalyse file" },
29-
{ IDYES, L"View last analysis" },
27+
{ IDOK, L"Upload file\nUpload fresh sample to VirusTotal for analysis" },
28+
{ IDRETRY, L"Reanalyse file\nRescan the existing sample on VirusTotal" },
29+
{ IDYES, L"View last analysis\nOpen the last VirusTotal analysis page" },
3030
};
3131

32-
HRESULT CALLBACK ShowAvailableCallbackProc(
32+
HRESULT CALLBACK TaskDialogResultFoundProc(
3333
_In_ HWND hwndDlg,
3434
_In_ UINT uMsg,
3535
_In_ WPARAM wParam,
@@ -87,7 +87,7 @@ VOID ShowFileFoundDialog(
8787

8888
if (Context->FileExists)
8989
{
90-
//was last analysed by VirusTotal on 2016-12-28 05:26:50 UTC (1 hour ago) it was first analysed by VirusTotal on 2016-12-12 17:08:19 UTC.
90+
// was last analysed by VirusTotal on 2016-12-28 05:26:50 UTC (1 hour ago) it was first analysed by VirusTotal on 2016-12-12 17:08:19 UTC.
9191
config.pszMainInstruction = PhaFormatString(
9292
L"%s was last analysed %s ago",
9393
PhGetStringOrEmpty(Context->BaseFileName),
@@ -113,9 +113,8 @@ VOID ShowFileFoundDialog(
113113
config.cxWidth = 200;
114114
config.pButtons = TaskDialogButtonArray;
115115
config.cButtons = ARRAYSIZE(TaskDialogButtonArray);
116-
117116
config.lpCallbackData = (LONG_PTR)Context;
118-
config.pfCallback = ShowAvailableCallbackProc;
117+
config.pfCallback = TaskDialogResultFoundProc;
119118

120119
SendMessage(Context->DialogHandle, TDM_NAVIGATE_PAGE, 0, (LPARAM)&config);
121-
}
120+
}

plugins/OnlineChecks/page3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Process Hacker Plugins -
3-
* Update Checker Plugin
3+
* Online Checks Plugin
44
*
55
* Copyright (C) 2016 dmex
66
*
@@ -96,4 +96,4 @@ VOID ShowVirusTotalProgressDialog(
9696
config.pfCallback = ShowProgressCallbackProc;
9797

9898
SendMessage(Context->DialogHandle, TDM_NAVIGATE_PAGE, 0, (LPARAM)&config);
99-
}
99+
}

plugins/OnlineChecks/page4.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Process Hacker Plugins -
3-
* Update Checker Plugin
3+
* Online Checks Plugin
44
*
55
* Copyright (C) 2016 dmex
66
*
@@ -78,4 +78,4 @@ VOID VirusTotalShowErrorDialog(
7878
config.pfCallback = TaskDialogErrorProc;
7979

8080
SendMessage(Context->DialogHandle, TDM_NAVIGATE_PAGE, 0, (LPARAM)&config);
81-
}
81+
}

plugins/OnlineChecks/upload.c

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
* Process Hacker Plugins -
3-
* Update Checker Plugin
3+
* Online Checks Plugin
44
*
5-
* Copyright (C) 2011-2016 dmex
5+
* Copyright (C) 2016 dmex
66
*
77
* This file is part of Process Hacker.
88
*
@@ -159,28 +159,6 @@ VOID TaskDialogCreateIcons(
159159
SendMessage(Context->DialogHandle, WM_SETICON, ICON_BIG, (LPARAM)Context->IconLargeHandle);
160160
}
161161

162-
VOID TaskDialogLinkClicked(
163-
_In_ PUPLOAD_CONTEXT Context
164-
)
165-
{
166-
//if (!PhIsNullOrEmptyString(Context->ReleaseNotesUrl))
167-
//{
168-
// PhShellExecute(Context->DialogHandle, PhGetStringOrEmpty(Context->ReleaseNotesUrl), NULL);
169-
//}
170-
}
171-
172-
PPH_STRING UpdaterGetOpaqueXmlNodeText(
173-
_In_ mxml_node_t *xmlNode
174-
)
175-
{
176-
if (xmlNode && xmlNode->child && xmlNode->child->type == MXML_OPAQUE && xmlNode->child->value.opaque)
177-
{
178-
return PhConvertUtf8ToUtf16(xmlNode->child->value.opaque);
179-
}
180-
181-
return PhReferenceEmptyString();
182-
}
183-
184162
PPH_STRING UpdateVersionString(
185163
VOID
186164
)
@@ -409,7 +387,6 @@ NTSTATUS UploadFileThreadStart(
409387
PH_STRING_BUILDER httpPostHeader = { 0 };
410388
PH_STRING_BUILDER httpPostFooter = { 0 };
411389
PUPLOAD_CONTEXT context = (PUPLOAD_CONTEXT)Parameter;
412-
BYTE buffer[PAGE_SIZE];
413390

414391
serviceInfo = GetUploadServiceInfo(context->Service);
415392

@@ -643,6 +620,8 @@ NTSTATUS UploadFileThreadStart(
643620

644621
while (TRUE)
645622
{
623+
BYTE buffer[PAGE_SIZE];
624+
646625
if (!context->UploadThreadHandle)
647626
goto CleanupExit;
648627

@@ -1182,9 +1161,6 @@ HRESULT CALLBACK TaskDialogBootstrapCallback(
11821161
// Create the Taskdialog icons
11831162
TaskDialogCreateIcons(context);
11841163

1185-
// Subclass the Taskdialog
1186-
SetWindowSubclass(hwndDlg, TaskDialogSubclassProc, 0, (ULONG_PTR)context);
1187-
11881164
if (SUCCEEDED(CoCreateInstance(&CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskbarList3, &context->TaskbarListClass)))
11891165
{
11901166
if (!SUCCEEDED(ITaskbarList3_HrInit(context->TaskbarListClass)))
@@ -1194,6 +1170,9 @@ HRESULT CALLBACK TaskDialogBootstrapCallback(
11941170
}
11951171
}
11961172

1173+
// Subclass the Taskdialog
1174+
SetWindowSubclass(hwndDlg, TaskDialogSubclassProc, 0, (ULONG_PTR)context);
1175+
11971176
ShowVirusTotalUploadDialog(context);
11981177
}
11991178
break;

plugins/OnlineChecks/virustotal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Process Hacker Online Checks -
3-
* database functions
3+
* VirusTotal functions
44
*
55
* Copyright (C) 2016 dmex
66
*

0 commit comments

Comments
 (0)