Page Menu
Home
desp's stash
Search
Configure Global Search
Log In
Files
F554867
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
);
Scylla
::
config
[
REMOVE_DOS_HEADER_STUB
].
setBool
(
removeDosHeaderStub
);
Scylla
::
config
[
IAT_FIX_AND_OEP_FIX
].
setBool
(
fixIatAndOep
);
}
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'
;
removeDosHeaderStub
=
Scylla
::
config
[
REMOVE_DOS_HEADER_STUB
].
getBool
();
fixIatAndOep
=
Scylla
::
config
[
IAT_FIX_AND_OEP_FIX
].
getBool
();
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Wed, Feb 11, 1:53 AM (1 d, 7 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c7/06/8fb5c22063b5229af2384058905d
Attached To
rSCY Scylla
Event Timeline
Log In to Comment