From: Steven E. <ste...@ya...> - 2002-07-23 22:21:20
|
This rocks dude. If you want me to help with testing/debugging this I will reinstall MS_VC and compile some simple applications once you figure out more of whats going on. Thanks Steven > I just found out why application compiled with MSVC++ don't run on ReactOS. > These apps have a slighly different layout compared to apps compiled with > MinGW. MSVC++ stores the IAT (Import Address Table) inside of the .rdata > section, MinGW stores the IAT inside of the .data section. Now the problem > is that the .rdata setion is read-only. To fix-up the IAT of an application > the offsets stored in the IAT must be overwritten by the real import > addresses. Obviously this wont work if the IAT is inside of a read-only > section. > > To fix this bug I added calls to NtProtectVirtualMemory() to the fixup > routine to change the IAT's protection to read-write before it is modified > and reset its protection after the fixup is done. > > When I had a look at NtProtectVirtualMemory() I saw that its core > functionality is disabled. What's wrong? __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com |