Page 1 of 1

64 Bit Support in MadRes?

Posted: Sat Jul 16, 2005 3:03 pm
by mimar
Does MadRes support updating 64 bit executable images?
Is the 64 bit header and data preserved correctly?
I notice both the WinAPIs and Visual Studio editor intermittently crash when working with 64 bit images.

So does MadRes have support for IA64, X64 executable images?

Posted: Mon Jul 18, 2005 7:05 am
by madshi
64bit executables are currently not supported. Honestly, I don't even know yet in which way they differ from 32bit executables. Probably they'll differ so much, that madRes won't work. I don't know it for sure, though. I'd suggest to simply try it out.

Posted: Mon Jul 18, 2005 10:55 pm
by mimar
Well, I have tried it out - I am happy to say MadRes works better than the Visual Studio editor, and the default Win32 API functions. However an exception is raised upon calling the Finalize... function, so there seems to be some room for improvement.

Re: 64 Bit Support in MadRes?

Posted: Mon Feb 20, 2012 7:48 pm
by qsqsqs
Hello,

Any news on this issue?
As far as I have tried the resource extraction from 64 bit files is working, but the adding of resources is not.
Any plans to update this package in the future with 64 bit support?
Thank you.

Best regards

Re: 64 Bit Support in MadRes?

Posted: Mon Feb 20, 2012 10:05 pm
by madshi
Yes, I do plan on making madRes work with 64bit exes soon. Don't ask me for a release date, though.

Re: 64 Bit Support in MadRes?

Posted: Tue Feb 21, 2012 4:04 pm
by qsqsqs
Good to know :). Thank you for creating this nice library, very useful.

Re: 64 Bit Support in MadRes?

Posted: Fri Apr 27, 2012 8:31 am
by zunzster
I need 64-bit support for madRes also.

I thought switching to the Windows routines might work for 32-bit and 64-bit modules but immediately bumped into the problem that the built-in UpdateResource family don't reliaby update the PE checksum which we've set madExcept to check for. Furthermore, the bug that corrupts modules in the presence of TD32 debug information is still there (and I expect is fairly low on Microsoft's priority list to ever fix). which is one of the things that prompted Mathias to write madRes in the first place.

Anyway, since we need this sooner rather than later - I've had a look at the code to see what the problem might be. First off, it's not coping with the fact that the NT OptionalHeader for 64-bit PE files is different from the 32-bit structure. After that, there might be size problems with the internal resource structures themselves.

If you've not already done so, Mathias, I might take a stab at adding support for 64-bit OptionalHeaders and see how far that gets me. I might need to dig into the internal resource structures after that.

If I go down this route and get it working, I'll send the code to Mathias.

Re: 64 Bit Support in MadRes?

Posted: Fri Apr 27, 2012 9:34 am
by madshi
My latest madRes sources already support x64. Just didn't get around releasing it yet. Maybe I'll get around releasing an x64 madRes beta build next week.

Re: 64 Bit Support in MadRes?

Posted: Fri Apr 27, 2012 10:59 am
by zunzster
Sounds good - saves me the hassle :-)

Just out of curiosity, was it just the OptionalHeader64 stuff you needed to change or were there internal issues as well?

Actually, just to be clear, does the updated madRes now support updating both x86 and x64 modules whether compiled as 32-bit or 64-bit or are you just meaning the new madRes will update 64-bit modules when compiled as 64-bit?

Ideally, I desire the former but could work with the latter although I might feel tempted to do the extra work myself out of cussedness and curiousity :-)

Re: 64 Bit Support in MadRes?

Posted: Fri Apr 27, 2012 11:45 am
by madshi
I don't remember what I changed exactly to make it work with 64bit PE files, it's been a few weeks ago. Have been busy with other stuff in the meanwhile. In any case, it can modify both 32bit and 64bit PE files. Doesn't matter in which bitdepth you compile it.

Re: 64 Bit Support in MadRes?

Posted: Fri Apr 27, 2012 8:51 pm
by zunzster
Awesome! I await the beta with bated breath.

Re: 64 Bit Support in MadRes?

Posted: Wed May 23, 2012 3:52 pm
by madshi
Better late than never:

http://madshi.net/madCollection.exe (installer version 2.7.0.0)

It's not a beta, after all, but the official new version, including madExcept 4... :wink: