From fc08bee5afdb07830d6c6fb28359a020a5c305c5 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 12 Jan 2016 12:32:15 +0100 Subject: Remove legacy Windows code We have lots of code that deals with Windows versions that we no longer support anyway. Clean out all of this old cruft. --- win/rfb_win32/Registry.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'win/rfb_win32/Registry.cxx') diff --git a/win/rfb_win32/Registry.cxx b/win/rfb_win32/Registry.cxx index 70083f4a..afbdd067 100644 --- a/win/rfb_win32/Registry.cxx +++ b/win/rfb_win32/Registry.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -100,11 +99,7 @@ void RegKey::openKey(const RegKey& root, const TCHAR* name, bool readOnly) { void RegKey::setDACL(const PACL acl, bool inherit) { DWORD result; - typedef DWORD (WINAPI *_SetSecurityInfo_proto) (HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION, PSID, PSID, PACL, PACL); - DynamicFn<_SetSecurityInfo_proto> _SetSecurityInfo(_T("advapi32.dll"), "SetSecurityInfo"); - if (!_SetSecurityInfo.isValid()) - throw rdr::SystemException("RegKey::setDACL failed", ERROR_CALL_NOT_IMPLEMENTED); - if ((result = (*_SetSecurityInfo)(key, SE_REGISTRY_KEY, + if ((result = SetSecurityInfo(key, SE_REGISTRY_KEY, DACL_SECURITY_INFORMATION | (inherit ? UNPROTECTED_DACL_SECURITY_INFORMATION : PROTECTED_DACL_SECURITY_INFORMATION), 0, 0, acl, 0)) != ERROR_SUCCESS) -- cgit v1.2.3