共用方式為


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