BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fix to make elCodeHook DEP-safe for Win64

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language BASM
View previous topic :: View next topic  
Author Message
Hallvard Vassbotn
Guest





PostPosted: Thu Oct 06, 2005 2:41 pm    Post subject: Fix to make elCodeHook DEP-safe for Win64 Reply with quote



Hi,

We were testing out our application with FastCode patching of Move etc.

On a Windows 2003 Server Standard Edition with DEP enabled, it crashed at
startup.

After a little bit of trial and error and changing the elCodeHook code, I
found the solution.

1. The first VirtualProtect call should use PAGE_EXECUTE_READWRITE not
PAGE_READWRITE

2. The second VirtualProtect call should be removed

Also, to make debugging easier, I've un-commented the RaiseLastOSError;
calls in case the VirtualProtect calls fail.
And I moved unused members into the private section.

I've uploaded my version of elCodeHook to .attachments ("FastCode: Win64
DEP-safe version of elCodeHook").

It also includes an updated version of elGetRTLAddress. This unit only reads
from the code segment, so it shouldn't mess with VirtualProtect at all.

/Hallvard

btw, is this the right procedure to contribute FastCode changes?


Back to top
Dennis
Guest





PostPosted: Thu Oct 06, 2005 2:55 pm    Post subject: Re: Fix to make elCodeHook DEP-safe for Win64 Reply with quote



Hi Hallvard

Good.

This is a fine way to post your findings.

We must hope that the webmanager picks it up and makes a release.

Best regards
Dennis


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language BASM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.