RtlUInt8Mult - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTINTSAFE_H_INCLUDED_
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)

//=============================================================================
// Multiplication functions
//=============================================================================

//
// UINT8 multiplication
//
_Must_inspect_result_
__inline
NTSTATUS
RtlUInt8Mult(
    _In_ UINT8 u8Multiplicand,
    _In_ UINT8 u8Multiplier,
    _Out_ _Deref_out_range_(==, u8Multiplicand * u8Multiplier) UINT8* pu8Result)
{
    UINT uResult = ((UINT)u8Multiplicand) * ((UINT)u8Multiplier);

    return RtlUIntToUInt8(uResult, pu8Result);
}

#endif
#endif

View code on GitHub
// ntintsafe.h

NTSTATUS RtlUInt8Mult(
  [in]  UINT8 u8Multiplicand,
  [in]  UINT8 u8Multiplier,
  [out] UINT8 *pu8Result
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntintsafe-rtluint8mult)

RtlUInt8Mult function

Description

Multiplies one value of type UINT8 by another.

Parameters

u8Multiplicand [in]

The value to be multiplied by u8Multiplier.

u8Multiplier [in]

The value by which to multiply u8Multiplicand.

pu8Result [out]

A pointer to the result. If the operation results in a value that overflows or underflows the capacity of the type, the function returns STATUS_INTEGER_OVERFLOW and this parameter is not valid.

Return value

Returns STATUS_SUCCESS if the operation is successful.

See the implementation of this helper function in ntintsafe.h in the WDK for possible error return values.

Remarks

This is one of a set of inline functions designed to provide arithmetic operations and perform validity checks with minimal impact on performance.