News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Processing 32 bit data with an external 64 bit app

Started by hutch--, November 23, 2022, 10:34:09 AM

Previous topic - Next topic

hutch--

For people who are still using 32 bit code but occasionally require 64 bit processing, attached are 2 test pieces, one written in 32 bit PowerBASIC, the other in 64 bit MASM. What is being tested is the use of a memory mapped file to pass data from a 32 bit app to a 64 bit app with the signalling being done with PostMessage() or SendMessage() using the HWND_BROADCAST handle.

The messages perform the signalling between the two apps, the memory mapped file is where the data is passed between the two apps. The examples are very simple on purpose, the 32 bit basic app sends text via the memory mapped file then sends a message to the 64 bit app to perform a task on the data. The 64 bit app sends a message back to the 32 bit app when it has processed the data and the 32 bit app reads the modified data and loads it into an ordinary text box.

This demo only changes the case of the text so that the change can be seen but with shared memory and message based signalling, you can send anything and perform any processing you want. This can be done between any two languages, as long as they support normal Windows API code with memory mapped files and messaging. It is a bit advanced for some but its not rocket science and its no big deal to do.