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;
const UNICODE_STRING FatName
const UNICODE_STRING Fat32Name
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
#define INVALID_HANDLE_VALUE
DWORD WINAPI GetLastError(VOID)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
BOOL WINAPI MoveFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
#define FILE_ATTRIBUTE_NORMAL
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
const UNICODE_STRING NtfsName
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)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
BOOL WINAPI GetFileTime(IN HANDLE hFile, OUT LPFILETIME lpCreationTime OPTIONAL, OUT LPFILETIME lpLastAccessTime OPTIONAL, OUT LPFILETIME lpLastWriteTime OPTIONAL)
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define RtlCompareMemory(s1, s2, l)