mirror of
https://github.com/reactos/reactos.git
synced 2024-11-24 20:13:31 +08:00
[KERNEL32]: w2k3ify GetDriveTypeA()
This commit is contained in:
parent
cb17d5dba4
commit
d7ee95b28b
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user