RtlIsNameLegalDOS8Dot3 function

The RtlIsNameLegalDOS8Dot3 routine determines whether a given name represents a valid short (8.3) file name.

Syntax

NTSYSAPI BOOLEAN RtlIsNameLegalDOS8Dot3(
  PCUNICODE_STRING Name,
  POEM_STRING      OemName,
  PBOOLEAN         NameContainsSpaces
);

Parameters

Name

Pointer to a Unicode string containing the file name.

OemName

Pointer to an optional caller-allocated buffer that receives a counted OEM string corresponding to the Unicode string at Name.

NameContainsSpaces

Pointer to an optional BOOLEAN value that receives TRUE if the string at Name contains embedded spaces, FALSE otherwise. This value is valid only if RtlIsNameLegalDOS8Dot3 returns TRUE.

Return Value

RtlIsNameLegalDOS8Dot3 returns TRUE if the string at Name is a legal short (8.3) file name, FALSE otherwise.

Remarks

RtlIsNameLegalDOS8Dot3 translates the Unicode string at Name using the OEM code page that was installed as the current system code page at system boot time, and converts the translated string to uppercase. (If the caller supplied a buffer at OemName, this buffer receives the resulting string.) RtlIsNameLegalDOS8Dot3 checks that the name is a properly formatted 8.3 name and contains only legal characters.

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

If the block of memory at Name is nonpaged, the caller can be running at IRQL <= DISPATCH_LEVEL. Otherwise, callers of RtlIsNameLegalDOS8Dot3 must be running at IRQL < DISPATCH_LEVEL.

Requirements

   
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL See Remarks section.

See Also

OEM_STRING

RtlGenerate8dot3Name

UNICODE_STRING