BOOLEAN
RtlIsNameLegalDOS8Dot3(
  IN  PUNICODE_STRING Name,
  IN OUT POEM_STRING OemName OPTIONAL,
  OUT PBOOLEAN NameContainsSpaces OPTIONAL
  );

Routine Description:

    This routine takes an input string and gives a definitive answer
    on whether this name can successfully be used to create a file
    on the FAT file system.

    This routine can therefore also be used to determine if a name is
    appropriate to be passed back to a Win31 or DOS app, i.e. whether
    the downlevel APP will understand the name.

    Note: an important part of this test is the mapping from UNICODE
    to Oem, which is why it is important that the input parameter be
    received in UNICODE.

Arguments:

    Name - The UNICODE name to test for conformance to 8.3 symantics.

    OemName - If specified, will receive the Oem name corresponding
        to the passed in Name.  Storage must be provided by the caller.
        The name is undefined if the routine returns FALSE.

    NameContainsSpaces - If the function returns TRUE, then this
        parameter will indicate if the names contains spaces.  If
        the function returns FALSE, this parameter is undefined. In
        many instances, the alternate name is more appropriate to
        use if spaces are present in the principle name, even if
        it is 8.3 compliant.

Return Value:

    BOOLEAN - TRUE if the passed in UNICODE name forms a valid 8.3
        FAT name when upcased to the current Oem code page.