RtlInsertUnicodePrefix function

The RtlInsertUnicodePrefix routine inserts a new element into a Unicode prefix table.

Syntax

NTSYSAPI BOOLEAN RtlInsertUnicodePrefix(
  PUNICODE_PREFIX_TABLE            PrefixTable,
  __drv_aliasesMem PUNICODE_STRING Prefix,
  PUNICODE_PREFIX_TABLE_ENTRY      PrefixTableEntry
);

Parameters

PrefixTable

Pointer to the prefix table. The table must have been initialized by calling RtlInitializeUnicodePrefix.

Prefix

Pointer to the name string to be inserted with the element at PrefixTableEntry.

PrefixTableEntry

Pointer to caller-allocated storage, which must be at least sizeof(UNICODE_PREFIX_TABLE_ENTRY), for the element to be inserted for the new prefix. RtlInsertUnicodePrefix initializes this element, which should be considered opaque by the caller.

Return Value

RtlInsertUnicodePrefix returns TRUE if the new element was inserted in the prefix table, or it returns FALSE if a duplicate element already exists in the prefix table.

Remarks

Each prefix entry in the table is a pathname relative to the root directory of a file system volume. To be well-formed, the prefix must begin with a single backslash ().

After inserting the new element, RtlInsertUnicodePrefix rebalances the prefix table's splay tree.

File systems must call RtlInitializeUnicodePrefix to initialize the prefix table before using any other Rtl..UnicodePrefix routines on it. The initialized prefix table structure should be considered opaque.

Callers of the Rtl..UnicodePrefix routines are responsible for synchronizing access to the prefix table. A fast mutex is the most efficient synchronization mechanism to use for this purpose.

For information about other string-handling routines, see Strings.

Requirements

   
Windows version Windows XP Windows Server 2003
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL "< DISPATCH_LEVEL"

See Also

RtlFindUnicodePrefix

RtlInitializeUnicodePrefix

RtlNextUnicodePrefix

RtlRemoveUnicodePrefix

UNICODE_STRING