Kernel32AppPolicyGetCreateFileAccess Method

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

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll")]
public static Win32ErrorCode AppPolicyGetCreateFileAccess(
	IntPtr processToken,
	out AppPolicyCreateFileAccess refPolicy
)

Parameters

processToken  IntPtr
A handle that identifies the access token for a process.
refPolicy  AppPolicyCreateFileAccess
When the function returns successfully, refPolicy contains a value indicating whether the process has full or restricted access to the I/O devices.

Return Value

Win32ErrorCode
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 refPolicy are null, the function returns ERROR_INVALID_PARAMETER.

Remarks

See Also