Multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. The final result is rounded to the nearest integer.
int MulDiv( int nNumber, int nNumerator, int nDenominator );
The number by which the result of the multiplication operation is to be divided.
If the function succeeds, the return value is the result of the multiplication and division, rounded to the nearest integer. If the result is a positive half integer (ends in .5), it is rounded up. If the result is a negative half integer, it is rounded down.
If either an overflow occurred or nDenominator was 0, the return value is -1.
|Minimum supported client||Windows XP [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2003 [desktop apps | UWP apps]|
|Header||winbase.h (include Windows.h)|