// Get drive root from path SString SharedUtil::GetPathDriveName( const SString& strPath ) { wchar_t szDrive[4] = L""; int iDriveNumber = PathGetDriveNumberW( FromUTF8( strPath ) ); if ( iDriveNumber > -1 ) PathBuildRootW( szDrive, iDriveNumber ); return ToUTF8( szDrive ); }
/************************************************************************* * PathBuildRoot [SHELL32.30] */ LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive) { if(SHELL_OsIsUnicode()) return PathBuildRootW(lpszPath, drive); return PathBuildRootA(lpszPath, drive); }