Page Menu
Home
desp's stash
Search
Configure Global Search
Log In
Files
F570775
OptionsGui.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
OptionsGui.cpp
View Options
#include
"OptionsGui.h"
#include
"Scylla.h"
BOOL
OptionsGui
::
OnInitDialog
(
CWindow
wndFocus
,
LPARAM
lInitParam
)
{
loadOptions
();
DoDataExchange
(
DDX_LOAD
);
// show settings
EditSectionName
.
LimitText
(
IMAGE_SIZEOF_SHORT_NAME
);
CenterWindow
();
return
TRUE
;
}
void
OptionsGui
::
OnOK
(
UINT
uNotifyCode
,
int
nID
,
CWindow
wndCtl
)
{
DoDataExchange
(
DDX_SAVE
);
saveOptions
();
Scylla
::
config
.
saveConfiguration
();
EndDialog
(
0
);
}
void
OptionsGui
::
OnCancel
(
UINT
uNotifyCode
,
int
nID
,
CWindow
wndCtl
)
{
EndDialog
(
0
);
}
void
OptionsGui
::
saveOptions
()
const
{
Scylla
::
config
[
USE_PE_HEADER_FROM_DISK
].
setBool
(
usePEHeaderFromDisk
);
Scylla
::
config
[
DEBUG_PRIVILEGE
].
setBool
(
debugPrivilege
);
Scylla
::
config
[
CREATE_BACKUP
].
setBool
(
createBackup
);
Scylla
::
config
[
DLL_INJECTION_AUTO_UNLOAD
].
setBool
(
dllInjectionAutoUnload
);
Scylla
::
config
[
UPDATE_HEADER_CHECKSUM
].
setBool
(
updateHeaderChecksum
);
Scylla
::
config
[
IAT_SECTION_NAME
].
setString
(
iatSectionName
);
}
void
OptionsGui
::
loadOptions
()
{
usePEHeaderFromDisk
=
Scylla
::
config
[
USE_PE_HEADER_FROM_DISK
].
getBool
();
debugPrivilege
=
Scylla
::
config
[
DEBUG_PRIVILEGE
].
getBool
();
createBackup
=
Scylla
::
config
[
CREATE_BACKUP
].
getBool
();
dllInjectionAutoUnload
=
Scylla
::
config
[
DLL_INJECTION_AUTO_UNLOAD
].
getBool
();
updateHeaderChecksum
=
Scylla
::
config
[
UPDATE_HEADER_CHECKSUM
].
getBool
();
wcsncpy_s
(
iatSectionName
,
Scylla
::
config
[
IAT_SECTION_NAME
].
getString
(),
_countof
(
iatSectionName
)
-
1
);
iatSectionName
[
_countof
(
iatSectionName
)
-
1
]
=
L
'\0'
;
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Mar 1, 2:45 PM (15 h, 13 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7e/45/c3e3a03a87fdb70f8fe0f95caebb
Attached To
rSCY Scylla
Event Timeline
Log In to Comment