[misc] move drive related functions into their own source

This commit is contained in:
Pete Batard 2011-12-01 17:54:35 +00:00
parent 79f3e78ec3
commit 2390b305c8
10 changed files with 226 additions and 162 deletions

11
rufus.h
View file

@ -136,6 +136,7 @@ extern BOOL ExtractMSDOS(const char* path);
extern void __cdecl FormatThread(void* param);
extern BOOL CreatePartition(HANDLE hDrive);
extern HANDLE GetDriveHandle(DWORD DriveIndex, char* DriveLetter, BOOL bWriteAccess, BOOL bLockDrive);
extern BOOL GetDriveLabel(DWORD DriveIndex, char* letter, char** label);
__inline static BOOL UnlockDrive(HANDLE hDrive)
{
@ -155,6 +156,16 @@ extern void StrArrayAdd(StrArray* arr, const char* str);
extern void StrArrayClear(StrArray* arr);
extern void StrArrayDestroy(StrArray* arr);
/* Clang/MinGW32 has an issue with intptr_t */
#ifndef _UINTPTR_T_DEFINED
#define _UINTPTR_T_DEFINED
#ifdef _WIN64
typedef unsigned __int64 uintptr_t;
#else
typedef unsigned int uintptr_t;
#endif
#endif
/* We need a redef of this MS structure */
typedef struct {
DWORD DeviceType;