2006-03-30 00:09:09 +00:00
|
|
|
/*****************************************************************************
|
|
|
|
|
|
|
|
Unfrag
|
|
|
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef UNFRAG_H
|
|
|
|
#define UNFRAG_H
|
|
|
|
|
|
|
|
|
|
|
|
// Blah blah blah your template name is too long ... SO WHAT
|
2008-02-20 20:58:39 +00:00
|
|
|
#ifdef _MSC_VER
|
2006-03-30 00:09:09 +00:00
|
|
|
#pragma warning (disable: 4786)
|
2008-02-20 20:58:39 +00:00
|
|
|
#endif
|
2006-03-30 00:09:09 +00:00
|
|
|
|
|
|
|
// I forget what this disables
|
|
|
|
#ifdef __ICL
|
|
|
|
#pragma warning (disable: 268)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Hello Mr. Platform SDK, please let us use Windows 2000 only features
|
2008-02-20 20:58:39 +00:00
|
|
|
#if 0
|
2006-03-30 00:09:09 +00:00
|
|
|
#ifndef WINVER
|
|
|
|
#define WINVER 0x0500
|
|
|
|
#define _WIN32_WINNT 0x0500
|
|
|
|
#endif
|
2008-02-20 20:58:39 +00:00
|
|
|
#endif
|
2006-03-30 00:09:09 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2008-04-20 09:23:29 +00:00
|
|
|
#include <windows.h>
|
|
|
|
#include <string>
|
2008-02-20 20:58:39 +00:00
|
|
|
//#include <initguid.h>
|
|
|
|
#include <winioctl.h>
|
2006-03-30 00:09:09 +00:00
|
|
|
|
2006-04-01 15:02:38 +00:00
|
|
|
#define APPNAME_CLI L"Unfrag"
|
|
|
|
#define APPNAME_GUI L"Fraginator"
|
|
|
|
#define APPVER_STR L"1.03"
|
2006-03-30 00:09:09 +00:00
|
|
|
#define APPVER_NUM 1.03f
|
2006-04-01 15:02:38 +00:00
|
|
|
#define APPAUTHOR L"Rick Brewster"
|
|
|
|
#define APPCOPYRIGHT L"Copyright 2000-2002 Rick Brewster"
|
2006-03-30 00:09:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
|
|
typedef unsigned __int8 uint8;
|
|
|
|
typedef signed __int8 sint8;
|
|
|
|
typedef unsigned __int16 uint16;
|
|
|
|
typedef signed __int16 sint16;
|
|
|
|
typedef unsigned __int32 uint32;
|
|
|
|
typedef signed __int32 sint32;
|
|
|
|
typedef unsigned __int64 uint64;
|
|
|
|
typedef signed __int64 sint64;
|
|
|
|
typedef unsigned char uchar;
|
|
|
|
|
|
|
|
|
|
|
|
extern bool QuietMode;
|
|
|
|
extern bool VerboseMode;
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
DefragInvalid,
|
|
|
|
DefragFast,
|
|
|
|
DefragExtensive,
|
|
|
|
DefragAnalyze
|
|
|
|
} DefragType;
|
|
|
|
|
|
|
|
|
|
|
|
extern bool CheckWinVer (void);
|
|
|
|
|
|
|
|
|
|
|
|
class Defragment;
|
2006-04-01 15:02:38 +00:00
|
|
|
extern Defragment *StartDefragThread (wstring Drive, DefragType Method, HANDLE &Handle);
|
2006-03-30 00:09:09 +00:00
|
|
|
|
|
|
|
|
2006-04-01 15:02:38 +00:00
|
|
|
extern wchar_t *AddCommas (wchar_t *Result, uint64 Number);
|
2006-03-30 00:09:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif // UNFRAG_H
|
|
|
|
|