Skip to content

Latest commit

 

History

History
84 lines (66 loc) · 2.6 KB

nf-processthreadsapi-setprotectedpolicy.md

File metadata and controls

84 lines (66 loc) · 2.6 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:processthreadsapi.SetProtectedPolicy
SetProtectedPolicy function (processthreadsapi.h)
Sets a protected policy.
SetProtectedPolicy
SetProtectedPolicy function
base.setprotectedpolicy
processthreadsapi/SetProtectedPolicy
base\setprotectedpolicy.htm
processthreadsapi
36975287-20F0-477B-870F-EA0AC40B39E3
12/05/2018
SetProtectedPolicy, SetProtectedPolicy function, base.setprotectedpolicy, processthreadsapi/SetProtectedPolicy
processthreadsapi.h
Windows.h
Windows
Windows 8.1 [desktop apps only]
Windows Server 2012 R2 [desktop apps only]
Kernel32.lib
Kernel32.dll
Windows
19H1
SetProtectedPolicy
processthreadsapi/SetProtectedPolicy
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-Processthreads-L1-1-2.dll
KernelBase.dll
MinKernelBase.dll
API-MS-Win-Core-ProcessThreads-L1-1-3.dll
SetProtectedPolicy

SetProtectedPolicy function

-description

Sets a protected policy. This function is for use primarily by Windows, and not designed for external use.

-parameters

-param PolicyGuid [in]

The globally-unique identifier of the policy to set.

-param PolicyValue [in]

The value to set the policy to.

-param OldPolicyValue [out]

Optionally receives the original value that was associated with the supplied policy.

-returns

True if the function succeeds; otherwise, false. To retrieve error values for this function, call <a href="/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.

-remarks

Protected policies are process-wide configuration settings that are stored in read-only memory. This is intended to help protect the policy from being corrupted or altered in an unintended way while an application is executing. Protected policies are primarily a construct internal to Windows.

To compile an application that calls this function, define _WIN32_WINNT as 0x0603 or later. For more information, see Using the Windows Headers.

This function became available in update 3 (the November 2014 update) for Windows 8.1 and Windows Server 2012 R2.