[KERNEL32]: w2k3ify GetDriveTypeA()

This commit is contained in:
Pierre Schweitzer 2017-10-05 23:43:10 +02:00
parent cb17d5dba4
commit d7ee95b28b

View File

@ -463,15 +463,26 @@ UINT
WINAPI
GetDriveTypeA(IN LPCSTR lpRootPathName)
{
PWCHAR RootPathNameW;
PWSTR RootPathU;
if (!lpRootPathName)
return GetDriveTypeW(NULL);
if (lpRootPathName != NULL)
{
PUNICODE_STRING RootPathUStr;
if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE)))
return DRIVE_UNKNOWN;
RootPathUStr = Basep8BitStringToStaticUnicodeString(lpRootPathName);
if (RootPathUStr == NULL)
{
return DRIVE_NO_ROOT_DIR;
}
return GetDriveTypeW(RootPathNameW);
RootPathU = RootPathUStr->Buffer;
}
else
{
RootPathU = NULL;
}
return GetDriveTypeW(RootPathU);
}
/*