#ifndef _NTINTSAFE_H_INCLUDED_
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
//
// LONG_PTR -> UCHAR conversion
//
_Must_inspect_result_
__inline
NTSTATUS
RtlLongPtrToUChar(
_In_ LONG_PTR lOperand,
_Out_ _Deref_out_range_(==, lOperand) UCHAR* pch)
{
NTSTATUS status;
if ((lOperand >= 0) && (lOperand <= 255))
{
*pch = (UCHAR)lOperand;
status = STATUS_SUCCESS;
}
else
{
*pch = '\0';
status = STATUS_INTEGER_OVERFLOW;
}
return status;
}
View code on GitHub
No description available.