Add support for WinTrust API

This commit is contained in:
2018-12-18 12:33:21 +01:00
parent aa7cd261f2
commit cd78963fd2
5 changed files with 124 additions and 0 deletions

34
src/WinTrust.cpp Normal file
View File

@@ -0,0 +1,34 @@
/*
Copyright 1991-2018 Amebis
Copyright 2016 G<>ANT
This file is part of WinStd.
Setup is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Setup 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Setup. If not, see <http://www.gnu.org/licenses/>.
*/
#include "StdAfx.h"
#pragma comment(lib, "Wintrust.lib")
//////////////////////////////////////////////////////////////////////
// winstd::wintrust
//////////////////////////////////////////////////////////////////////
winstd::wintrust::~wintrust()
{
m_wtd.dwStateAction = WTD_STATEACTION_CLOSE;
WinVerifyTrust(m_hwnd, (GUID*)&m_action, &m_wtd);
}