共用方式為


RtlCompareString 函式 (ntddk.h)

RtlCompareString 例程會比較兩個計數的字串。

語法

NTSYSAPI LONG RtlCompareString(
  [in] const STRING *String1,
  [in] const STRING *String2,
  [in] BOOLEAN      CaseInSensitive
);

參數

[in] String1

第一個字串的指標。

[in] String2

第二個字串的指標。

[in] CaseInSensitive

如果 TRUE,則執行比較時應該忽略大小寫。

傳回值

RtlCompareString 會傳回帶正負號的值,以提供比較的結果:

傳回碼 描述
String1 等於 string2
< 零
String1 小於 string2
> 零
String1 大於 String2

要求

要求 價值
最低支援的用戶端 從 Windows 2000 開始提供。
目標平臺 普遍
標頭 ntddk.h (include Ntddk.h, Ntifs.h)
連結庫 NtosKrnl.lib
DLL NtosKrnl.exe (核心模式):Ntdll.dll (使用者模式)
IRQL PASSIVE_LEVEL

另請參閱

RtlCompareUnicodeString

RtlEqualString