RtlIsNameLegalDOS8Dot3 - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntifs.h

NTSYSAPI BOOLEAN RtlIsNameLegalDOS8Dot3(
  [in]            PCUNICODE_STRING Name,
  [in, out]       POEM_STRING      OemName,
  [out, optional] PBOOLEAN         NameContainsSpaces
);
View the official Windows Driver Kit DDI reference
// winternl.h

BOOLEAN RtlIsNameLegalDOS8Dot3(
  [in]                PUNICODE_STRING Name,
  [in, out, optional] POEM_STRING     OemName,
  [out, optional]     PBOOLEAN        NameContainsSpaces
);
View the official Win32 API reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntifs-rtlisnamelegaldos8dot3)

RtlIsNameLegalDOS8Dot3 function

Description

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

Parameters

Name [in]

Pointer to a Unicode string containing the file name.

OemName [in, out]

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

NameContainsSpaces [out, optional]

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 Run-Time Library (RTL) Routines.

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.

See also

OEM_STRING

RtlGenerate8dot3Name

UNICODE_STRING


Win32 API reference (nf-winternl-rtlisnamelegaldos8dot3)

RtlIsNameLegalDOS8Dot3 function

Description

[RtlIsNameLegalDOS8Dot3 is available for use in Windows XP. It may be altered or unavailable in subsequent versions. Applications that target a minimum of Windows Server 2003 and Windows XP with Service Pack 1 (SP1) and later should use the CheckNameLegalDOS8Dot3 function.]

Determines whether or not a specified name can be used to create a file on the FAT file system.

Parameters

Name [in]

The file name, in 8.3 format.

OemName [in, out, optional]

A pointer to a buffer that receives the OEM string that corresponds to Name.

This parameter can be NULL.

NameContainsSpaces [out, optional]

If the function returns TRUE, this parameter indicates whether or not the name contains spaces.

If the function returns FALSE, this parameter is undefined.

Return value

If the specified name forms a valid 8.3 FAT file system name in the current OEM code page, the function returns TRUE. Otherwise, the function returns FALSE.

Remarks

This function does not have an associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to NtDll.dll.

See also

CheckNameLegalDOS8Dot3