14#define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s }
24 WCHAR RootPath[] = {
'A',
':',
'\\',
'\0'};
25 WCHAR FileSystemName[
sizeof(
"FAT32")];
27 WCHAR File1[] = {
'\\',
'f',
'i',
'l',
'e',
'1',
'\0'};
28 WCHAR File2[] = {
'\\',
'f',
'i',
'l',
'e',
'2',
'\0'};
34 if (
GetTempPathW(
sizeof(TempPath) /
sizeof(TempPath[0]), TempPath) == 0)
41 RootPath[0] = TempPath[0];
58 fprintf(
stderr,
"!(FAT, FAT32, NTFS): \'%S\'\n", FSName.Buffer);
63 FilePos =
wcslen(TempPath);
96 TempPath[FilePos - 1] = 0;
107 TempPath[FilePos] = 0;
109 wcscpy(CopyPath, TempPath);
111 CopyPath[
wcslen(TempPath) - 1] = 0;
119 wcscpy(CopyPath, TempPath);
121 CopyPath[
wcslen(TempPath) - 1] =
L'2';
144 CopyPath[
wcslen(TempPath) - 1] = 0;
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI GetFileTime(IN HANDLE hFile, OUT LPFILETIME lpCreationTime OPTIONAL, OUT LPFILETIME lpLastAccessTime OPTIONAL, OUT LPFILETIME lpLastWriteTime OPTIONAL)
BOOL WINAPI MoveFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName)
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
#define RtlCompareMemory(s1, s2, l)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
#define RTL_CONSTANT_STRING(s)
const UNICODE_STRING Fat32Name
const UNICODE_STRING NtfsName
const UNICODE_STRING FatName
DWORD WINAPI GetLastError(void)