Process Hacker
onlnchk.h
Go to the documentation of this file.
1 /*
2  * Process Hacker Online Checks -
3  * Main Headers
4  *
5  * Copyright (C) 2010-2013 wj32
6  * Copyright (C) 2012-2014 dmex
7  *
8  * This file is part of Process Hacker.
9  *
10  * Process Hacker is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * Process Hacker is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Process Hacker. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef ONLNCHK_H
25 #define ONLNCHK_H
26 
27 #pragma comment(lib, "Winhttp.lib")
28 
29 #define CINTERFACE
30 #define COBJMACROS
31 #include <phdk.h>
32 #include <windowsx.h>
33 #include <winhttp.h>
34 
35 #include "sha256.h"
36 #include "resource.h"
37 
38 #define PLUGIN_NAME L"ProcessHacker.OnlineChecks"
39 
40 #define HASH_SHA1 1
41 #define HASH_SHA256 2
42 
43 #define UM_EXISTS (WM_USER + 1)
44 #define UM_LAUNCH (WM_USER + 2)
45 #define UM_ERROR (WM_USER + 3)
46 
47 #define Control_Visible(hWnd, visible) \
48  ShowWindow(hWnd, visible ? SW_SHOW : SW_HIDE);
49 
51 {
59 
60 typedef struct _SERVICE_INFO
61 {
62  ULONG Id;
63  PWSTR HostName;
64  INTERNET_PORT HostPort;
65  ULONG HostFlags;
69 
70 typedef struct _UPLOAD_CONTEXT
71 {
72  ULONG Service;
77  HFONT MessageFont;
78  HINTERNET HttpHandle;
79 
80  ULONG ErrorCode;
82 
84 
91 
92 // main
94 
95 // upload
96 #define UPLOAD_SERVICE_VIRUSTOTAL 101
97 #define UPLOAD_SERVICE_JOTTI 102
98 #define UPLOAD_SERVICE_CIMA 103
99 
101  _In_ PPH_STRING FileName,
102  _In_ ULONG Service
103  );
104 
105 #endif