Good evening guys!
I’m currently designing a desktop interface with various features using Firemonkey/FMX. One of these features is the ability to show information inside a “panel”. This “panel” consists of a title and context (both tlabel), and an image (timage). One panel is created for each “application” that wishes to interact with my application. Each panel is named when it’s created using a variable assigned when calling the procedure to create it, which is designed to allow other developers to access their panel with ease, but there’s a risk this could be exploited so i may switch to bindingname.
I’ve already written the code to create one of these panels based upon variables, as well as the code to typecast down to the label and image levels based on a nested iterative .children and FindComponent loop, and i can freely change the text of the labels or the image (with .loadfromfile) using this method (i.e. the code works). However, as i’m wanting to open this feature to other applications and developers to actually display information inside one of these “panels”, i need to work with Shared Memory.
The problem is that i truly can’t understand it. Everything i’ve read implies that using SharedMem is easy, but i just can’t understand it at all. Even the simple example in XE2’s included samples confuses me. I unfortunately don’t understand IPC at all, despite trying numerous times to get a grasp on it. I could use inifiles, but i don’t feel they have flexibility required. I considered GlobalAtomTable, but as with SharedMem, i don’t understand that either, not to mention that it reportedly leaks in Delphi.
Essentially, i’m looking for a function/procedure where i first create the area of shared memory. I’m then really looking for a function to read a string from that sharedmemory and output the result for me to access via other procedures or functions. As i’d like to make my other projects compatible with this one, i’d also be looking to get a procedure/function to write values to the shared memory from a seperate application.
As i said, i don’t understand IPC or SharedMem, and i really need a basic start point from which i can work and teach myself, up to the more advanced levels. A step-by-step Walkthrough on exactly what i’m hoping to learn would be much appreciated. I am wanting to learn this rather than just get a lump of code as it’s pretty much a given that i should be working with IPC by now.
Look at Cromis IMC or IPC components.
The IMC is for inter machine communication using tcp (indy) and the IPC is for inter process communication using windows named pipes.
Both uses the same client/server message system(packet based), so you don’t have to dwell over the windows documentation to implement your application.
Just follow the examples found on the links above and you would have your application running in no time. Btw, the author
Iztok Kacinis a SO member.