Fixed all VS2015 warnings except C4577 ('noexcept' used with no exception handling mode specified)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6627 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b54c831ff0
commit
1c1d1d5e12
12 changed files with 124 additions and 31 deletions
|
@ -2,6 +2,14 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include <nsis/pluginapi.h> // nsis plugin
|
||||
|
||||
#if defined(_MSC_VER) && !defined(GetVersion)
|
||||
#if _MSC_VER >= 1500
|
||||
FORCEINLINE DWORD NoDepr_GetVersion() { __pragma(warning(push))__pragma(warning(disable:4996)) DWORD r = GetVersion(); __pragma(warning(pop)) return r; }
|
||||
#define GetVersion NoDepr_GetVersion
|
||||
#endif //~ _MSC_VER >= 1500
|
||||
#endif //~ _MSC_VER
|
||||
|
||||
typedef BOOL (WINAPI*CHECKTOKENMEMBERSHIP)(HANDLE TokenHandle,PSID SidToCheck,PBOOL IsMember);
|
||||
CHECKTOKENMEMBERSHIP _CheckTokenMembership=NULL;
|
||||
|
||||
|
@ -47,11 +55,12 @@ TCHAR* GetAccountTypeHelper(BOOL CheckTokenForGroupDeny)
|
|||
TCHAR *group = NULL;
|
||||
HANDLE hToken = NULL;
|
||||
|
||||
|
||||
#ifndef _WIN64
|
||||
if (GetVersion() & 0x80000000) // Not NT
|
||||
{
|
||||
return _T("Admin");
|
||||
}
|
||||
#endif
|
||||
|
||||
// First we must open a handle to the access token for this thread.
|
||||
if (OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hToken) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue