The MASM Forum

General => The Laboratory => Topic started by: jj2007 on March 20, 2013, 09:09:46 PM

Title: IPC between 32- and 64-bit apps using SendMessage
Post by: jj2007 on March 20, 2013, 09:09:46 PM
Since calling 32-bit dlls from the 64-bit world seems not to work, I tested IPC using RegisterWindowMessage and SendMessage. You can't use pointers, of course, but two dwords (or two REAL4) can in some cases be sufficient to tap a 32-bit library from a 64-bit app.

Results show that it's not a good solution for an innermost loop that runs a Million times: A single exchange of dwords takes roughly 10-30,000 cycles. Still, if some specific app ported from 32- to 64-bit depends on some exotic old 32-bit library, and speed is not an issue, it might be an option.

Attached three executables - extract to some folder and launch client.exe. The sources are also there, in an arc file with two PellesC projects and Client.asm (or Client.asc for those not scared of colours ;))
Title: Re: IPC between 32- and 64-bit apps using SendMessage
Post by: qWord on March 21, 2013, 01:23:17 AM
Which obscure packer do we need to unpack *.arc files? - zip files seems to be too trivial for that task.
Title: Re: IPC between 32- and 64-bit apps using SendMessage
Post by: frktons on March 21, 2013, 01:35:20 AM
Quote from: qWord on March 21, 2013, 01:23:17 AM
Which obscure packer do we need to unpack *.arc files? - zip files seems to be too trivial for that task.
Try WinRAR.
Title: Re: IPC between 32- and 64-bit apps using SendMessage
Post by: anta40 on March 21, 2013, 01:36:04 AM
Try FreeArc (http://freearc.org/)
Title: Re: IPC between 32- and 64-bit apps using SendMessage
Post by: frktons on March 21, 2013, 01:45:29 AM
Quote from: anta40 on March 21, 2013, 01:36:04 AM
Try FreeArc (http://freearc.org/)
Even better
Title: Re: IPC between 32- and 64-bit apps using SendMessage
Post by: jj2007 on March 21, 2013, 01:51:53 AM
Quote from: qWord on March 21, 2013, 01:23:17 AM
Which obscure packer...

Simply the best - FreeArc (http://www.maximumcompression.com/data/summary_mf2.php#data)

Ok, here is the version for the WinZip fans ;-)