RtlShortToULongPtr 函数 (ntintsafe.h)

SHORT 类型的值转换为 ULONG_PTR 类型的值。

语法

NTSTATUS RtlShortToULongPtr(
  [in]  SHORT     sOperand,
  [out] ULONG_PTR *pulResult
);

参数

[in] sOperand

要转换的值。

[out] pulResult

指向转换后的值的指针。 在转换导致原始值截断的情况下,函数返回STATUS_INTEGER_OVERFLOW且此参数无效。

返回值

如果操作成功,则返回STATUS_SUCCESS。

有关可能的错误返回值,请参阅 WDK 中的 中 ntintsafe.h 此帮助程序函数的实现。

注解

这是一组内联函数之一,旨在提供类型转换和执行有效性检查,同时对性能的影响最小。

此函数使用以下备用名称:

  • RtlLongLongToDWordPtr
  • RtlLongLongToSIZET
  • RtlLong64ToULongPtr
  • RtlLong64ToDWordPtr
  • RtlLong64ToSIZET
  • RtlInt64ToULongPtr
  • RtlInt64ToDWordPtr
  • RtlInt64ToSIZET
  • RtlShortToSIZET
  • RtlInt16ToULongPtr
  • RtlInt16ToDWordPtr
  • RtlInt16ToSIZET

要求

要求
目标平台 桌面
标头 ntintsafe.h