Hi, Iím writing a program in assembly and I want to allow other people to write programs that can interact with it. Now I was told before that I could do this through dlls, but I donít think they will work. It is my understanding that dlls allow you to write and compile procedures that accept variables, etc and return values. Perhaps Iím mistaken in that. What I want shouldnít need dlls as I only want to allow access to it while itís running. Basically my program will run along side two or more programs written by someone else, ideally in any language. These programs will be continually reading variables controlled by my program (they shouldnít be allowed to change them) and they will then be able to instruct my program to carry out specific actions. When I programmed in VB I could used OLE to allow other OLE capable programs to read but not write to variables and they could then call public subroutines in my program which would carry out specific tasks and update the public variables accordingly ready for more instructions. So basically is this possible in assembly (It has to be really) ? Iím presume public variables and procedures must exist in MASM. Any help, code, links, etc will be most appreciated.
I was told to look up some info on DPMI information and some Protected Mode info regarding this problem, does anyone know of a good source. If you know a better/different way to do it don't hesitate either.
From your post: Basically my (your) program will: 1) run along side two or more programs 2) written by someone else, 3) ideally in any language. 4) continually reading variables controlled by my program Numbers 1,2 and 3 have COM (OLE) written all over them, especially the multi-language compatability. The only way to do #4 efficiently (how much CPU time should you spend reading a value that diesn't change?) is through either a callback or a COM event. You have a few issues to contend with in virgin teritory: 1) Marshaling across proceses. So far all COM efforts have been in process, but as long as you confine yourself to automation compatable types (a long and useful list) you can use the default Universal Marshaller and avoid writing your own stub code. 2) Registering and unregistering your interfaces in the RunningObject Table (ROT). Probably not hard but a detail to attend. 3) writing an event callback interface. Might not be so incredibly hard to do, it's almost at the top of my list, so you could steal my code once it gets published. And don't forget: http://here.is/cominasm
Thanks ernie, that looks like the way to go, I'll start reading the documentation on your site now. PS I just read your articles on debugging and extracing word values, Very well written congrats. Zadkiel