Commit 0fb5bb13 authored by gr01d's avatar gr01d
Browse files

v14.8src code VS2012

parent 1ba02e93
[Dolphin]
Timestamp=2017,8,11,19,5,31
Version=3
[Settings]
HiddenFilesShown=true
call "%VCINSTALLDIR%\vcvarsall.bat" x86
pause
\ No newline at end of file
1. Open Developer Command Prompt for VS20XX
2. change dir to CNTXDLL
3. call build.bat
4. Enjoy!
\ No newline at end of file
@echo off
set LIBS=kernel32.lib user32.lib advapi32.lib shell32.lib ole32.lib
set DEFINES=/D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPLORERSHELL_EXPORTS"
set UNICODE=/D "UNICODE" /D "_UNICODE"
call "%VCINSTALLDIR%\vcvarsall.bat" x86
:: 32 bit unicode
echo Building 32bit Release Unicode
mkdir Release_Unicode
rc.exe /d "NDEBUG" /l 0x409 /fo".\Release_Unicode/ExplorerShell.res" .\ExplorerShell.rc
if not "%ERRORLEVEL%"=="0" goto END
cl /O1 %DEFINES% %UNICODE% /O1 /FD /EHsc /MT /Fo".\Release_Unicode/" /Fd".\Release_Unicode/" /W3 /c /TP .\ShellExtImpl.cpp .\ShellExt.cpp
if not "%ERRORLEVEL%"=="0" goto END
link.exe /OUT:".\Release_Unicode/ExpShell.dll" /INCREMENTAL:NO /NOLOGO /DLL /DEF:".\ExplorerShell.def" /PDB:".\Release_Unicode/ExplorerShell.pdb" /IMPLIB:".\Release_Unicode/ExplorerShell.lib" /MACHINE:X86 .\Release_Unicode\ExplorerShell.res .\Release_Unicode\ShellExt.obj .\Release_Unicode\ShellExtImpl.obj %LIBS%
if not "%ERRORLEVEL%"=="0" goto END
:: 32 bit ansi
echo Building 32bit Release Ansi
mkdir Release
rc.exe /d "NDEBUG" /l 0x409 /fo".\Release/ExplorerShell.res" .\ExplorerShell.rc
if not "%ERRORLEVEL%"=="0" goto END
cl /O1 %DEFINES% /O1 /FD /EHsc /MT /Fo".\Release/" /Fd".\Release/" /W3 /c /TP .\ShellExtImpl.cpp .\ShellExt.cpp
if not "%ERRORLEVEL%"=="0" goto END
link.exe /OUT:".\Release/ExpShell.dll" /INCREMENTAL:NO /NOLOGO /DLL /DEF:".\ExplorerShell.def" /PDB:".\Release/ExplorerShell.pdb" /IMPLIB:".\Release/ExplorerShell.lib" /MACHINE:X86 .\Release\ExplorerShell.res .\Release\ShellExt.obj .\Release\ShellExtImpl.obj %LIBS%
if not "%ERRORLEVEL%"=="0" goto END
:: 64 bit unicode
call "%VCINSTALLDIR%\vcvarsall.bat" x86_amd64
echo Building 64bit Release Unicode
mkdir Release_x64
rc.exe /d "NDEBUG" /l 0x409 /fo".\Release_x64/ExplorerShell.res" .\ExplorerShell.rc
if not "%ERRORLEVEL%"=="0" goto END
cl /Wp64 /O1 %DEFINES% /O1 /FD /EHsc /MT /Fo".\Release_x64/" /Fd".\Release_x64/" /W3 /c /TP .\ShellExtImpl.cpp .\ShellExt.cpp
if not "%ERRORLEVEL%"=="0" goto END
link.exe /OUT:".\Release_x64/ExpShell64.dll" /INCREMENTAL:NO /NOLOGO /DLL /DEF:".\ExplorerShell.def" /PDB:".\Release_x64/ExplorerShell.pdb" /IMPLIB:".\Release_x64/ExplorerShell.lib" /MACHINE:X64 .\Release_x64\ExplorerShell.res .\Release_x64\ShellExt.obj .\Release_x64\ShellExtImpl.obj %LIBS%
if not "%ERRORLEVEL%"=="0" goto END
pause
:END
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
Msgbox(64, "3", FileGetShortName("D:\New Folder (2)\124\ClamWin\clamwin-cpp\cpp\build.bat"))
\ No newline at end of file
This diff is collapsed.
/*
*
* Clamav GUI Wrapper
*
* Copyright (c) 2006-2009 Gianluigi Tiesi <sherpya@netfarm.it>
* Modified by GPM (c) 2010-2014
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this software; if not, write to the
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define WIN32_LEAN_AND_MEAN
#define _CRT_SECURE_NO_DEPRECATE
#pragma warning(disable: 4311 4312) /* yes, yes I use a bool as a pointer */
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <io.h>
#include <fcntl.h>
#define CLAMSCAN "gpmavscan.exe"
#define FRESHCLAM "gpmavupdate.exe"
#define SIGTOOL "sigtool.exe"
extern HWND MainDlg;
extern BOOL isScanning;
extern void WriteStdOut(LPSTR msg, BOOL freshclam);
extern void GetDestinationFolder(void);
DWORD WINAPI PipeToClamAV(LPVOID lpvThreadParam);
extern HANDLE m_hEvtStop;
extern PROCESS_INFORMATION pi;
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_BITMAP BITMAP "GPMBANNER_1.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_MAIN DIALOGEX 0, 0, 501, 334
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "GPM Antivirus 2014 Scan GUI"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
PUSHBUTTON "Custom Scan",IDC_SCAN,410,46,78,14
EDITTEXT IDC_TARGET,5,29,452,15,ES_AUTOHSCROLL
DEFPUSHBUTTON "...",IDC_BROWSE,464,29,23,15
CONTROL "Scan All Drives",IDC_ALLDRIVES,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,12,58,78,11
CONTROL "Scan Folders ",IDC_RECURSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,68,78,11
CONTROL "Show only infected",IDC_ONLYINFECTED,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,12,78,78,11
CONTROL "Load Database",IDC_db,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,94,76,78,11
PUSHBUTTON "Cancel Operation",IDC_CANCEL,411,110,79,14
EDITTEXT IDC_STATUS,9,130,490,199,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL
GROUPBOX "Scan Options",IDC_STATIC,8,47,171,81,WS_GROUP
PUSHBUTTON "Update VDB",IDC_UPDATE,411,78,77,15
CONTROL "Beep",IDC_BEEP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,89,72,10
CONTROL "Save to Log File",IDC_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,98,69,10
CONTROL "Use Tempdir",IDC_TEMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,108,77,10
CONTROL "No Summary",IDC_NOSUMMARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,58,72,10
CONTROL "Debug Mode",IDC_DEBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,66,73,10
CONTROL "Remove Viruses",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,94,105,67,10
CONTROL "Quarantine Viruses",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,94,114,77,10
CONTROL "Quiet",IDC_QUIET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,86,33,8
CONTROL "Report Infected File(s)",IDC_REPORT,"Button",BS_AUTORADIOBUTTON,94,96,84,8
CONTROL 101,IDC_STATIC,"Static",SS_BITMAP | SS_REALSIZEIMAGE,0,1,501,24
GROUPBOX "Extra Scan Options",IDC_STATIC,183,44,214,80,WS_GROUP
CONTROL "Verbose",IDC_EXVERBOSE,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,189,57,42,11
CONTROL "Do not Remove Temp Files",IDC_EXDONOTREMTEMP,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,189,68,95,11
CONTROL "Load Official DB Only",IDC_LOADONLYODB,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,189,80,78,11
CONTROL "Detect PUA",IDC_DETECTPUA,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,189,91,99,11
CONTROL "Detect Broken EXE Files",IDC_DETECTBROKENEXE,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,189,101,94,11
CONTROL "Block Encrypted Archives",IDC_BLOCKENCARCH,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,189,111,96,11
CONTROL "Do not scan files > 200MB",IDC_DONOTSCAN150,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,289,56,102,11
CONTROL "Scan Mail Files",IDC_SCANMAIL,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,289,68,78,11
CONTROL "Algorithmic Detection",IDC_USEALGO,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,289,79,78,11
CONTROL "Max Recursion 50",IDC_MAXRECUR,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,289,90,78,11
CONTROL "Max Files 500",IDC_MAXFILES,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,289,101,78,11
CONTROL "Max Scan Size 150MB",IDC_MAXFILESIZE,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,289,111,96,11
PUSHBUTTON "VDB2",IDC_DISPVDB2,440,94,22,14
PUSHBUTTON "VDB3",IDC_DISPVDB3,467,95,22,14
PUSHBUTTON "Scan Memory",IDC_SCANMEM,410,62,79,14
PUSHBUTTON "VDB1",IDC_DISPVDB1,412,95,22,14
END
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON ICON "GPMAV-GUI.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 14,0,0,8
PRODUCTVERSION 14,0,0,8
FILEFLAGSMASK 0x0L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x0L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "Comments", "GPM Antivirus Scanner GUI"
VALUE "CompanyName", "GPM"
VALUE "FileDescription", "GPMAV SCANGUI"
VALUE "FileVersion", "14.0.0.8"
VALUE "InternalName", "GPMAV-SCANGUI.exe"
VALUE "LegalCopyright", "Copyright (C) 2010-2014 GPM / ClamWin Pty. Ltd."
VALUE "LegalTrademarks", "GPM"
VALUE "OriginalFilename", "GPMAV-SCANGUI.exe"
VALUE "OriginalFileVersion", "14, 0, 0, 8"
VALUE "ProductName", "GPMAV SCANGUI"
VALUE "ProductVersion", "14.0.0.8"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_MAIN, DIALOG
BEGIN
MOCKUP, 0, 100, 0, 0, ".\GPMBANNER_1.bmp"
VERTGUIDE, 88
VERTGUIDE, 93
VERTGUIDE, 109
VERTGUIDE, 214
BOTTOMMARGIN, 329
END
END
#endif // APSTUDIO_INVOKED
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
3 TEXTINCLUDE
BEGIN
"\r\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GPMAV-GUI", "ClamAV-GUI.vcxproj", "{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
x64|Win32 = x64|Win32
x64|x64 = x64|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.Debug|Win32.ActiveCfg = Debug|Win32
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.Debug|Win32.Build.0 = Debug|Win32
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.Debug|x64.ActiveCfg = Debug|x64
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.Debug|x64.Build.0 = Debug|x64
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.Release|Win32.ActiveCfg = Release|Win32
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.Release|Win32.Build.0 = Release|Win32
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.Release|x64.ActiveCfg = Release|Win32
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.Release|x64.Build.0 = Release|Win32
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.x64|Win32.ActiveCfg = x64|x64
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.x64|Win32.Build.0 = x64|x64
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.x64|x64.ActiveCfg = x64|x64
{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}.x64|x64.Build.0 = x64|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
[dialogs]
1004=C:\Users\GR1BN\Desktop
1005=0
1006=1
1008=0
1009=0
1015=
1007=1
1010=0
1011=1
1012=1
1013=0
1016=0
1017=0
1018=0
1020=1
1022=0
1023=0
1024=1
1025=1
1026=1
1027=0
1028=1
1029=1
1031=0
1032=1
1033=1
1034=1
/*
* Clamav GUI Wrapper
*
* Copyright (c) 2006-2009 Gianluigi Tiesi <sherpya@netfarm.it>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this software; if not, write to the
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <GPMAV-GUI.h>
#include <resource.h>
#include <windows.h>
#define BUFSIZE 1024
#define BAIL_OUT(code) { isScanning = FALSE; return code; }
HANDLE m_hEvtStop;
HANDLE hChildStdinWrDup = INVALID_HANDLE_VALUE, hChildStdoutRdDup = INVALID_HANDLE_VALUE;
PROCESS_INFORMATION pi;
DWORD exitcode = 0;
void RedirectStdOutput(BOOL freshclam)
{
char chBuf[BUFSIZE];
DWORD dwRead;
DWORD dwAvail = 0;
if (!PeekNamedPipe(hChildStdoutRdDup, NULL, 0, NULL, &dwAvail, NULL) || !dwAvail)
return;
if (!ReadFile(hChildStdoutRdDup, chBuf, min(BUFSIZE - 1, dwAvail), &dwRead, NULL) || !dwRead)
return;
chBuf[dwRead] = 0;
WriteStdOut(chBuf, freshclam);
}
DWORD WINAPI OutputThread(LPVOID lpvThreadParam)
{
char msg[128];
HANDLE Handles[2];
Handles[0] = pi.hProcess;
Handles[1] = m_hEvtStop;
ResumeThread(pi.hThread);
while(1)
{
DWORD dwRc = WaitForMultipleObjects(2, Handles, FALSE, 100);
RedirectStdOutput((BOOL) lpvThreadParam);
if ((dwRc == WAIT_OBJECT_0) || (dwRc == WAIT_OBJECT_0 + 1) || (dwRc == WAIT_FAILED))
break;
}
CloseHandle(hChildStdoutRdDup);
sprintf(msg, "\r\nProcess exited with %d code\r\n", exitcode);
WriteStdOut(msg, FALSE);
EnableWindow(GetDlgItem(MainDlg, IDC_SCAN), TRUE);
EnableWindow(GetDlgItem(MainDlg, IDC_SCANMEM), TRUE);
EnableWindow(GetDlgItem(MainDlg, IDC_UPDATE), TRUE);
EnableWindow(GetDlgItem(MainDlg, IDC_DISPVDB1), TRUE);
EnableWindow(GetDlgItem(MainDlg, IDC_DISPVDB2), TRUE);
EnableWindow(GetDlgItem(MainDlg, IDC_DISPVDB3), TRUE);
isScanning = FALSE;
return 1;
}
BOOL LaunchClamAV(LPSTR pszCmdLine, HANDLE hStdOut, HANDLE hStdErr)
{
STARTUPINFO si;
ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
ZeroMemory(&si, sizeof(STARTUPINFO));
si.cb = sizeof(STARTUPINFO);
si.hStdOutput = hStdOut;
si.hStdError = hStdErr;
si.wShowWindow = SW_HIDE;
si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
if (!CreateProcess(NULL, pszCmdLine,
NULL, NULL,
TRUE,
CREATE_NEW_CONSOLE | CREATE_SUSPENDED,
NULL, NULL,
&si,
&pi))
return FALSE;
return TRUE;
}
DWORD WINAPI PipeToClamAV(LPVOID lpvThreadParam)
{
HANDLE hChildStdoutRd, hChildStdoutWr, hChildStderrWr;
char *pszCmdLine = (char *) lpvThreadParam;
if (!pszCmdLine) BAIL_OUT(-1);
SECURITY_ATTRIBUTES saAttr;
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
saAttr.bInheritHandle = TRUE;
saAttr.lpSecurityDescriptor = NULL;
/* Create a pipe for the child process's STDOUT */
if(!CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &saAttr, 0))
BAIL_OUT(-1);
/* Duplicate stdout sto stderr */
if (!DuplicateHandle(GetCurrentProcess(), hChildStdoutWr, GetCurrentProcess(), &hChildStderrWr, 0, TRUE, DUPLICATE_SAME_ACCESS))
BAIL_OUT(-1);
/* Duplicate the pipe HANDLE */
if (!DuplicateHandle(GetCurrentProcess(), hChildStdoutRd, GetCurrentProcess(), &hChildStdoutRdDup, 0, FALSE, DUPLICATE_SAME_ACCESS))
BAIL_OUT(-1);
CloseHandle(hChildStdoutRd);
EnableWindow(GetDlgItem(MainDlg, IDC_SCAN), FALSE);
EnableWindow(GetDlgItem(MainDlg, IDC_SCANMEM), FALSE);
EnableWindow(GetDlgItem(MainDlg, IDC_UPDATE), FALSE);
EnableWindow(GetDlgItem(MainDlg, IDC_DISPVDB1), FALSE);
EnableWindow(GetDlgItem(MainDlg, IDC_DISPVDB2), FALSE);
EnableWindow(GetDlgItem(MainDlg, IDC_DISPVDB3), FALSE);
SetWindowText(GetDlgItem(MainDlg, IDC_STATUS), "");
WriteStdOut(pszCmdLine, FALSE);
WriteStdOut("\r\n\r\n", FALSE);
LaunchClamAV(pszCmdLine, hChildStdoutWr, hChildStderrWr);
BOOL freshclam = !_strnicmp(pszCmdLine, "gpmavupdate", 9);
delete pszCmdLine;
CloseHandle(hChildStdoutWr);
m_hEvtStop = CreateEvent(NULL, TRUE, FALSE, NULL);
DWORD m_dwThreadId;
HANDLE m_hThread = CreateThread(NULL, 0, OutputThread, (LPVOID) freshclam, 0, &m_dwThreadId);
WaitForSingleObject(pi.hProcess, INFINITE);
GetExitCodeProcess(pi.hProcess, &exitcode);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
pi.hProcess = INVALID_HANDLE_VALUE;
SetEvent(m_hEvtStop);
return 0;
}
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>GPMAV-UPDATE-GUI</ProjectName>
<ProjectGuid>{E9E295BE-05E7-4794-BAC9-55430A2EB3F5}</ProjectGuid>
<RootNamespace>GPMAV-UPDATE-GUI</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v110_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>