#include "Unfrag.h"
#include "DriveVolume.h"
#include "Defragment.h"
#include <process.h>
Go to the source code of this file.
◆ AddCommas()
Definition at line 48 of file Unfrag.cpp.
49{
50 wchar_t Temp[128];
51 int TempLen;
52
54 wchar_t *StrPosResult =
NULL;
55 wchar_t *StrPosOrig =
NULL;
56
57
58
59
62 StrPosOrig = Temp;
65 {
67 {
69 StrPosResult++;
70 }
71
72 *StrPosResult = *StrPosOrig;
73 StrPosResult++;
74 StrPosOrig++;
75
76 *StrPosResult = 0;
77
79 }
80
82}
wchar_t * AddCommas(wchar_t *Result, uint64 Number)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Referenced by AddCommas(), and SetReportInfo().
◆ CheckWinVer()
Definition at line 19 of file Unfrag.cpp.
20{
22
26
27
28
29
30
31
32
35 {
36 return (false);
37 }
38
39
41 return (false);
42
43
44 return (true);
45}
#define VER_PLATFORM_WIN32_WINDOWS
#define VER_PLATFORM_WIN32s
ULONG dwOSVersionInfoSize
Referenced by FraggerHelp(), and wWinMain().
◆ DefragThread()
◆ FraggerHelp()
Definition at line 95 of file Unfrag.cpp.
96{
97 wprintf (
L"Usage: unfrag drive: [...] <-f | -e>\n");
99 wprintf (
L"drive: : The drive to defrag. Should be two characters long, ie 'c:' or 'd:'.\n");
100 wprintf (
L" Multiple drives may be given, and all will be simultaneously\n");
101 wprintf (
L" defragmented using the same options.\n");
102 wprintf (
L"-f : Do a fast defragmentation. Files that are not fragmented will not be\n");
103 wprintf (
L" moved. Only one pass is made over the file list. Using this option\n");
104 wprintf (
L" may result in not all files being defragmented, depending on\n");
105 wprintf (
L" available disk space.\n");
106 wprintf (
L"-e : Do an extensive defragmention. Files will be moved in an attempt to\n");
107 wprintf (
L" defragment both files and free space.\n");
108
110 {
112 wprintf (
L"NOTE: This program requires Windows 2000, which is not presently running on\n");
114 }
115
116 return;
117}
◆ PrintBanner()
◆ StartDefragThread()
Definition at line 132 of file Unfrag.cpp.
133{
136
138
141 return (Defragger);
142}
void __cdecl DefragThread(LPVOID parm)
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
_CRTIMP uintptr_t __cdecl _beginthread(_In_ void(__cdecl *_StartAddress)(void *), _In_ unsigned _StackSize, _In_opt_ void *_ArgList)
Referenced by MainDialogProc().
◆ QuietMode
◆ VerboseMode