ReactOS
0.4.16-dev-41-ge8c7597
Fraginator.cpp
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Fraginator
4
5
*****************************************************************************/
6
7
#define NDEBUG
8
9
#include "
Fraginator.h
"
10
#include "
Mutex.h
"
11
#include "
DriveVolume.h
"
12
#include "
Defragment.h
"
13
#include "
MainDialog.h
"
14
#include "
resource.h
"
15
#ifdef _MSC_VER
16
#include <
crtdbg.h
>
17
#endif
18
19
HINSTANCE
GlobalHInstance
=
NULL
;
20
Defragment
*
Defrag
=
NULL
;
21
22
INT
WINAPI
23
wWinMain
(
HINSTANCE
HInstance,
24
HINSTANCE
hPrev,
25
LPWSTR
Cmd
,
26
int
iCmd)
27
{
28
INITCOMMONCONTROLSEX
InitControls
;
29
30
// debugging crap
31
#ifndef NDEBUG
32
_CrtSetDbgFlag
(
_CRTDBG_LEAK_CHECK_DF
|
_CrtSetDbgFlag
(
_CRTDBG_REPORT_FLAG
));
33
_CrtSetReportMode
(
_CRT_WARN
,
_CRTDBG_MODE_FILE
);
34
_CrtSetReportFile
(
_CRT_WARN
,
_CRTDBG_FILE_STDOUT
);
35
_CrtSetReportMode
(
_CRT_ERROR
,
_CRTDBG_MODE_FILE
);
36
_CrtSetReportFile
(
_CRT_ERROR
,
_CRTDBG_FILE_STDOUT
);
37
_CrtSetReportMode
(
_CRT_ASSERT
,
_CRTDBG_MODE_FILE
);
38
_CrtSetReportFile
(
_CRT_ASSERT
,
_CRTDBG_FILE_STDOUT
);
39
#endif
40
41
GlobalHInstance
= HInstance;
42
43
// We want our progress bar! NOW!
44
InitControls
.dwSize =
sizeof
(
InitControls
);
45
InitControls
.dwICC =
ICC_WIN95_CLASSES
;
46
InitCommonControlsEx
(&
InitControls
);
47
48
if
(!
CheckWinVer
())
49
{
50
MessageBox
(
GetDesktopWindow
(),
L
"Sorry, this program requires Windows 2000."
,
L
"Error"
,
MB_OK
);
51
return
(0);
52
}
53
54
DialogBox
(HInstance,
MAKEINTRESOURCE
(
IDD_MAIN
),
GetDesktopWindow
(),
MainDialogProc
);
55
56
#if 0
57
AllocConsole
();
58
if
(
_CrtDumpMemoryLeaks
())
59
MessageBox
(
NULL
,
L
"Click OK to quit"
,
L
"Leaks"
,
MB_OK
);
60
#endif
61
62
return
(0);
63
}
64
Defragment.h
DriveVolume.h
Defrag
Defragment * Defrag
Definition:
Fraginator.cpp:20
wWinMain
INT WINAPI wWinMain(HINSTANCE HInstance, HINSTANCE hPrev, LPWSTR Cmd, int iCmd)
Definition:
Fraginator.cpp:23
GlobalHInstance
HINSTANCE GlobalHInstance
Definition:
Fraginator.cpp:19
Fraginator.h
MainDialogProc
INT_PTR CALLBACK MainDialogProc(HWND Dlg, UINT Msg, WPARAM WParam, LPARAM LParam)
Definition:
MainDialog.cpp:424
MainDialog.h
Mutex.h
CheckWinVer
bool CheckWinVer(void)
Definition:
Unfrag.cpp:19
AllocConsole
BOOL WINAPI AllocConsole(VOID)
Definition:
console.c:74
IDD_MAIN
#define IDD_MAIN
Definition:
resource.h:106
Defragment
Definition:
Defragment.h:42
InitCommonControlsEx
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition:
commctrl.c:900
crtdbg.h
_CRT_ASSERT
#define _CRT_ASSERT
Definition:
crtdbg.h:21
_CRTDBG_FILE_STDOUT
#define _CRTDBG_FILE_STDOUT
Definition:
crtdbg.h:31
_CRTDBG_MODE_FILE
#define _CRTDBG_MODE_FILE
Definition:
crtdbg.h:24
_CrtDumpMemoryLeaks
#define _CrtDumpMemoryLeaks()
Definition:
crtdbg.h:257
_CRTDBG_LEAK_CHECK_DF
#define _CRTDBG_LEAK_CHECK_DF
Definition:
crtdbg.h:52
_CRTDBG_REPORT_FLAG
#define _CRTDBG_REPORT_FLAG
Definition:
crtdbg.h:60
_CrtSetReportMode
#define _CrtSetReportMode(t, f)
Definition:
crtdbg.h:129
_CRT_ERROR
#define _CRT_ERROR
Definition:
crtdbg.h:20
_CRT_WARN
#define _CRT_WARN
Definition:
crtdbg.h:19
_CrtSetDbgFlag
#define _CrtSetDbgFlag(f)
Definition:
crtdbg.h:245
_CrtSetReportFile
#define _CrtSetReportFile(t, f)
Definition:
crtdbg.h:130
NULL
#define NULL
Definition:
types.h:112
void
Definition:
nsiface.idl:2307
InitControls
static VOID InitControls(HWND hwnd)
Definition:
mplay32.c:303
L
#define L(x)
Definition:
ntvdm.h:50
ICC_WIN95_CLASSES
#define ICC_WIN95_CLASSES
Definition:
commctrl.h:66
Cmd
@ Cmd
Definition:
sacdrv.h:278
tagINITCOMMONCONTROLSEX
Definition:
commctrl.h:54
INT
int32_t INT
Definition:
typedefs.h:58
resource.h
WINAPI
#define WINAPI
Definition:
msvc.h:6
GetDesktopWindow
HWND WINAPI GetDesktopWindow(void)
Definition:
window.c:628
MB_OK
#define MB_OK
Definition:
winuser.h:793
MessageBox
#define MessageBox
Definition:
winuser.h:5834
MAKEINTRESOURCE
#define MAKEINTRESOURCE
Definition:
winuser.h:591
DialogBox
#define DialogBox
Definition:
winuser.h:5773
LPWSTR
WCHAR * LPWSTR
Definition:
xmlstorage.h:184
modules
rosapps
applications
fraginator
Fraginator.cpp
Generated on Wed Sep 18 2024 06:06:09 for ReactOS by
1.9.6