AppPolicyGetCreateFileAccess function (appmodel.h)

Retrieves a value indicating whether a process has full or restricted access to the IO devices (file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe).

Syntax

LONG AppPolicyGetCreateFileAccess(
  [in]  HANDLE                    processToken,
  [out] AppPolicyCreateFileAccess *policy
);

Parameters

[in] processToken

A handle that identifies the access token for a process.

[out] policy

A pointer to a variable of the AppPolicyCreateFileAccess enumerated type. When the function returns successfully, the variable contains an enumerated constant value indicating whether the process has full or restricted access to the IO devices.

Return value

If the function succeeds, the function returns ERROR_SUCCESS.

If no known create file access policy was found for the process token, the function raises a STATUS_ASSERTION_FAILURE exception and returns ERROR_NOT_FOUND.

If either processToken or policy are null, the function returns ERROR_INVALID_PARAMETER.

Requirements

Requirement Value
Target Platform Windows
Header appmodel.h
Library OneCoreUap.lib
DLL Api-ms-win-appmodel-runtime-l1-1-2.dll