1*c2c66affSColin Finck /***************************************************************************** 2*c2c66affSColin Finck 3*c2c66affSColin Finck Unfrag 4*c2c66affSColin Finck 5*c2c66affSColin Finck *****************************************************************************/ 6*c2c66affSColin Finck 7*c2c66affSColin Finck 8*c2c66affSColin Finck #ifndef UNFRAG_H 9*c2c66affSColin Finck #define UNFRAG_H 10*c2c66affSColin Finck 11*c2c66affSColin Finck 12*c2c66affSColin Finck // Blah blah blah your template name is too long ... SO WHAT 13*c2c66affSColin Finck #ifdef _MSC_VER 14*c2c66affSColin Finck #pragma warning (disable: 4786) 15*c2c66affSColin Finck #endif 16*c2c66affSColin Finck 17*c2c66affSColin Finck // I forget what this disables 18*c2c66affSColin Finck #ifdef __ICL 19*c2c66affSColin Finck #pragma warning (disable: 268) 20*c2c66affSColin Finck #endif 21*c2c66affSColin Finck 22*c2c66affSColin Finck 23*c2c66affSColin Finck // Hello Mr. Platform SDK, please let us use Windows 2000 only features 24*c2c66affSColin Finck #if 0 25*c2c66affSColin Finck #ifndef WINVER 26*c2c66affSColin Finck #define WINVER 0x0500 27*c2c66affSColin Finck #define _WIN32_WINNT 0x0500 28*c2c66affSColin Finck #endif 29*c2c66affSColin Finck #endif 30*c2c66affSColin Finck 31*c2c66affSColin Finck #include <stdio.h> 32*c2c66affSColin Finck #include <stdlib.h> 33*c2c66affSColin Finck #include <windows.h> 34*c2c66affSColin Finck #include <string> 35*c2c66affSColin Finck //#include <initguid.h> 36*c2c66affSColin Finck #include <winioctl.h> 37*c2c66affSColin Finck 38*c2c66affSColin Finck #define APPNAME_CLI L"Unfrag" 39*c2c66affSColin Finck #define APPNAME_GUI L"Fraginator" 40*c2c66affSColin Finck #define APPVER_STR L"1.03" 41*c2c66affSColin Finck #define APPVER_NUM 1.03f 42*c2c66affSColin Finck #define APPAUTHOR L"Rick Brewster" 43*c2c66affSColin Finck #define APPCOPYRIGHT L"Copyright 2000-2002 Rick Brewster" 44*c2c66affSColin Finck 45*c2c66affSColin Finck 46*c2c66affSColin Finck #include <vector> 47*c2c66affSColin Finck #include <string> 48*c2c66affSColin Finck using namespace std; 49*c2c66affSColin Finck 50*c2c66affSColin Finck 51*c2c66affSColin Finck typedef unsigned __int8 uint8; 52*c2c66affSColin Finck typedef signed __int8 sint8; 53*c2c66affSColin Finck typedef unsigned __int16 uint16; 54*c2c66affSColin Finck typedef signed __int16 sint16; 55*c2c66affSColin Finck typedef unsigned __int32 uint32; 56*c2c66affSColin Finck typedef signed __int32 sint32; 57*c2c66affSColin Finck typedef unsigned __int64 uint64; 58*c2c66affSColin Finck typedef signed __int64 sint64; 59*c2c66affSColin Finck typedef unsigned char uchar; 60*c2c66affSColin Finck 61*c2c66affSColin Finck 62*c2c66affSColin Finck extern bool QuietMode; 63*c2c66affSColin Finck extern bool VerboseMode; 64*c2c66affSColin Finck 65*c2c66affSColin Finck 66*c2c66affSColin Finck typedef enum 67*c2c66affSColin Finck { 68*c2c66affSColin Finck DefragInvalid, 69*c2c66affSColin Finck DefragFast, 70*c2c66affSColin Finck DefragExtensive, 71*c2c66affSColin Finck DefragAnalyze 72*c2c66affSColin Finck } DefragType; 73*c2c66affSColin Finck 74*c2c66affSColin Finck 75*c2c66affSColin Finck extern bool CheckWinVer (void); 76*c2c66affSColin Finck 77*c2c66affSColin Finck 78*c2c66affSColin Finck class Defragment; 79*c2c66affSColin Finck extern Defragment *StartDefragThread (wstring Drive, DefragType Method, HANDLE &Handle); 80*c2c66affSColin Finck 81*c2c66affSColin Finck 82*c2c66affSColin Finck extern wchar_t *AddCommas (wchar_t *Result, uint64 Number); 83*c2c66affSColin Finck 84*c2c66affSColin Finck 85*c2c66affSColin Finck #endif // UNFRAG_H 86*c2c66affSColin Finck 87