Skip to content

Commit

Permalink
No longer manually enable DEP at run-time
Browse files Browse the repository at this point in the history
Many thanks to @0xC0000054 for pointing out that DEP in PhotoDemon.exe breaks compatibility with many legacy Photoshop 8bf plugins.

(Note that PhotoDemon will still run fine under DEP on systems where it is enforced for *all* processes - but PhotoDemon itself will no longer manually activate DEP via SetProcessDEPPolicy.)
  • Loading branch information
tannerhelland committed Nov 6, 2023
1 parent 828c922 commit 4d3c2a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Modules/Main.bas
Expand Up @@ -102,9 +102,18 @@ DamnThisPCisOld:
' where m_IsProgramRunning is declared.
m_IsProgramRunning = True

'In the past, PhotoDemon would manually enable DEP in an attempt to satisfy various virus scanners.
' (I never tested this empirically to see if it made a difference.)
'
'In 2023 I was notified that DEP breaks many legacy 3rd-party Photoshop plugins. Ideally, I would write a
' separate non-DEP .exe that runs Photoshop plugins and then communicates results back to PD itself,
' but at present it's much easier for me to simply disable DEP in PD itself as I have no empirical evidence
' that manually enabling DEP makes any difference to end-users.

'CURRENTLY DISABLED PER COMMENT ABOVE:
'On Win 7+, manually enable DEP. This may decrease issues with low-quality 3rd-party virus
' and malware scanners, and PD works just fine with DEP enabled.
OS.EnableProcessDEP
'OS.EnableProcessDEP

'FormMain can now be loaded. (We load it first, because many initialization steps silently interact with it,
' like loading menu icons or prepping toolboxes.) That said, the first step of FormMain's load process is calling
Expand Down
2 changes: 1 addition & 1 deletion PhotoDemon.vbp
Expand Up @@ -520,7 +520,7 @@ Description="PhotoDemon Photo Editor"
CompatibleMode="0"
MajorVer=9
MinorVer=1
RevisionVer=207
RevisionVer=209
AutoIncrementVer=1
ServerSupportFiles=0
VersionComments="Copyright 2000-2023 Tanner Helland - photodemon.org"
Expand Down

0 comments on commit 4d3c2a8

Please sign in to comment.