- fix compilation with msvc

svn path=/trunk/; revision=32432
This commit is contained in:
Johannes Anderwald 2008-02-20 19:13:52 +00:00
parent 1be9788940
commit 9cd1948c7d

View file

@ -48,7 +48,7 @@ bool DriveVolume::Open (wstring Name)
RootPath = Name.c_str(); RootPath = Name.c_str();
RootPath += L"\\"; RootPath += L"\\";
Handle = CreateFile Handle = CreateFileW
( (
FileName, FileName,
MAXIMUM_ALLOWED, // access MAXIMUM_ALLOWED, // access
@ -71,7 +71,7 @@ bool DriveVolume::Open (wstring Name)
BOOL Result; BOOL Result;
ReturnVal = true; ReturnVal = true;
Result = GetVolumeInformation Result = GetVolumeInformationW
( (
RootPath.c_str(), RootPath.c_str(),
VolName, VolName,
@ -140,7 +140,7 @@ bool DriveVolume::ObtainInfo (void)
DWORD FreeClusters; DWORD FreeClusters;
DWORD TotalClusters; DWORD TotalClusters;
Result = GetDiskFreeSpace Result = GetDiskFreeSpaceW
( (
RootPath.c_str(), RootPath.c_str(),
&SectorsPerCluster, &SectorsPerCluster,
@ -155,7 +155,7 @@ bool DriveVolume::ObtainInfo (void)
VolInfo.ClusterSize = SectorsPerCluster * BytesPerSector; VolInfo.ClusterSize = SectorsPerCluster * BytesPerSector;
Result = GetDiskFreeSpaceEx Result = GetDiskFreeSpaceExW
( (
RootPath.c_str(), RootPath.c_str(),
(PULARGE_INTEGER)&nan, (PULARGE_INTEGER)&nan,
@ -367,7 +367,7 @@ uint32 DriveVolume::RemoveDBFile (uint32 Indice)
bool DriveVolume::ScanDirectory (wstring DirPrefix, ScanCallback Callback, void *UserData) bool DriveVolume::ScanDirectory (wstring DirPrefix, ScanCallback Callback, void *UserData)
{ {
WIN32_FIND_DATA FindData; WIN32_FIND_DATAW FindData;
HANDLE FindHandle; HANDLE FindHandle;
wstring SearchString; wstring SearchString;
uint32 DirIndice; uint32 DirIndice;
@ -377,7 +377,7 @@ bool DriveVolume::ScanDirectory (wstring DirPrefix, ScanCallback Callback, void
SearchString = DirPrefix; SearchString = DirPrefix;
SearchString += L"*.*"; SearchString += L"*.*";
ZeroMemory (&FindData, sizeof (FindData)); ZeroMemory (&FindData, sizeof (FindData));
FindHandle = FindFirstFile (SearchString.c_str(), &FindData); FindHandle = FindFirstFileW (SearchString.c_str(), &FindData);
if (FindHandle == INVALID_HANDLE_VALUE) if (FindHandle == INVALID_HANDLE_VALUE)
return (false); return (false);
@ -460,7 +460,7 @@ bool DriveVolume::ScanDirectory (wstring DirPrefix, ScanCallback Callback, void
ScanDirectory (Dir, Callback, UserData); ScanDirectory (Dir, Callback, UserData);
} }
} while (FindNextFile (FindHandle, &FindData) == TRUE); } while (FindNextFileW (FindHandle, &FindData) == TRUE);
FindClose (FindHandle); FindClose (FindHandle);
return (false); return (false);
@ -497,7 +497,7 @@ bool DriveVolume::GetClusterInfo (FileInfo &Info, HANDLE &HandleResult)
FullName = GetDBDir (Info.DirIndice) + Info.Name; FullName = GetDBDir (Info.DirIndice) + Info.Name;
Handle = CreateFile Handle = CreateFileW
( (
FullName.c_str(), FullName.c_str(),
0, //GENERIC_READ, 0, //GENERIC_READ,
@ -688,7 +688,7 @@ bool DriveVolume::MoveFileDumb (uint32 FileIndice, uint64 NewLCN)
*/ */
// Open file // Open file
FileHandle = CreateFile FileHandle = CreateFileW
( (
FullName.c_str (), FullName.c_str (),
GENERIC_READ, GENERIC_READ,