IoCheckFunctionAccess function (ntifs.h)
The IoCheckFunctionAccess routine checks the parameters and access for a function against the current granted access to the file.
Syntax
NTSTATUS IoCheckFunctionAccess(
ACCESS_MASK GrantedAccess,
UCHAR MajorFunction,
UCHAR MinorFunction,
ULONG IoControlCode,
PVOID Arg1,
PVOID Arg2
);
Parameters
GrantedAccess
Mask value that specifies the access currently granted to the file for the caller.
MajorFunction
Major function code for the operation being performed.
MinorFunction
Minor function code for the operation being performed.
IoControlCode
I/O function control code for a device or file system I/O code.
Arg1
Optional argument that depends on the major function. This parameter points to one of the FILE_INFORMATION_CLASS enum values if MajorFunction indicates a query or set file information function is being performed.
Arg2
Optional second argument that depends on the major function. This parameter points to one of the FS_INFORMATION_CLASS enum values. This parameter must be supplied if MajorFunction indicates a query or set file information function is being performed.
Return value
IoCheckFunctionAccess returns STATUS_SUCCESS if the caller has access to the file; otherwise, it returns STATUS_ACCESS_DENIED.
Remarks
The GrantedAccess mask cannot contain any generic mappings. That is, IoCheckDesiredAccess must have been previously invoked to return a full mask.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | ntifs.h (include Ntifs.h) |