38 if ((
_tcslen(lpszVolumeName) == 2) && (lpszVolumeName[1] ==
_T(
':')))
41 _tcscat(RealVolumeName, lpszVolumeName);
45 _tcscpy(RealVolumeName, lpszVolumeName);
48 _tprintf(
_T(
"Opening volume \'%s\'\n"), lpszVolumeName);
75 DWORD dwNumberOfBytesRead;
87 if (dwFilePosition != (SectorNumber * 512))
95 if (!bRetVal || (dwNumberOfBytesRead != 512))
107 DWORD dwNumberOfBytesWritten;
108 DWORD dwFilePosition;
119 if (dwFilePosition != (SectorNumber * 512))
127 if (!bRetVal || (dwNumberOfBytesWritten != 512))
HANDLE OpenVolume(const TCHAR *Volume, BOOLEAN AllowRemote, BOOLEAN NtfsOnly)
BOOL ReadVolumeSector(ULONG SectorNumber, PVOID SectorBuffer)
BOOL WriteVolumeSector(ULONG SectorNumber, PVOID SectorBuffer)
static HANDLE hDiskVolume
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetLastError(void)