ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

VOID NTAPI FormatEx ( IN PWCHAR  DriveRoot,
IN FMIFS_MEDIA_FLAG  MediaFlag,
IN PWCHAR  Format,
IN PWCHAR  Label,
IN BOOLEAN  QuickFormat,
IN ULONG  ClusterSize,
IN PFMIFSCALLBACK  Callback 
)

Definition at line 24 of file format.c.

Referenced by _tmain(), and FormatDrive().

{
    PIFS_PROVIDER Provider;
    UNICODE_STRING usDriveRoot;
    UNICODE_STRING usLabel;
    BOOLEAN Argument = FALSE;
    WCHAR VolumeName[MAX_PATH];
    //CURDIR CurDir;

    Provider = GetProvider(Format);
    if (!Provider)
    {
        /* Unknown file system */
        Callback(
            DONE, /* Command */
            0, /* DWORD Modifier */
            &Argument); /* Argument */
        return;
    }

#if 1
    DPRINT1("Warning: use GetVolumeNameForVolumeMountPointW() instead!\n");
    swprintf(VolumeName, L"\\??\\%c:", towupper(DriveRoot[0]));
    RtlCreateUnicodeString(&usDriveRoot, VolumeName);
    /* Code disabled as long as our storage stack doesn't understand IOCTL_MOUNTDEV_QUERY_DEVICE_NAME */
#else
    if (!GetVolumeNameForVolumeMountPointW(DriveRoot, VolumeName, MAX_PATH)
     || !RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, &CurDir))
    {
        /* Report an error. */
        Callback(
            DONE, /* Command */
            0, /* DWORD Modifier */
            &Argument); /* Argument */
        return;
    }
#endif

    RtlInitUnicodeString(&usLabel, Label);

    DPRINT("FormatEx - %S\n", Format);
    Provider->FormatEx(
        &usDriveRoot,
        MediaFlag,
        &usLabel,
        QuickFormat,
        ClusterSize,
        Callback);
    RtlFreeUnicodeString(&usDriveRoot);
}

Generated on Sun May 27 2012 04:45:01 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.