IoGetFunctionCodeFromCtlCode

ULONG
    IoGetFunctionCodeFromCtlCode(

        IN ULONG ControlCode
        );

IoGetFunctionCodeFromCtlCode returns the value of the Function in a given IOCTL_XXX control code.

Return Value

IoGetFunctionCodeFromCtlCode returns the value of the Function field (bits 2 through 13, inclusive) in the IOCTL_XXX.

Parameters

ControlCode
Points to the IOCTL _XXX (or FSCTL_XXX) in the driver’s I/O stack location of the IRP at Parameters.DeviceIoControl.IoControlCode.

Comments

See Part II of this manual for more information about the layout of IOCTL_XXX codes and using the CTL_CODE macro.

File system drivers also can call this routine to extract FSCTL_XXX function codes on receipt of an IRP_MJ_FILE_SYSTEM_CONTROL request.

Callers of IoGetFunctionCodeFromCtlCode must be running at IRQL <= DISPATCH_LEVEL.

See Also

CTL_CODE, IoBuildDeviceIoControlRequest