DLX Dynamic Loading and EXecution Copyright (c) 1997, Nanosoft, Inc. There is absolutely NO WARRANTY OF ANY KIND on this code. Any loss of data, sleep, memory, or sanity is NOT MY PROBLEM This code is provided free, with one, and only one, restriction: IF YOU USE IT, YOU MUST CREDIT ME!!!!!!! All this means is that you must take the following (between cut lines) and put it in a visible place in your documentation, and preferrably on program load. I reiterate: VISIBLE. ---------------- DLX Module provided by Nanosoft, Inc. ------------ Other than this, the program is completely free of charge and may be used for any purpose whatsoever (except virii, but that goes without saying). I repeat, I TAKE NO RESPONSIBILITY WHATSOEVER. Now for the tecnical details: First, you must build DLXGEN.EXE. You need this program to make any DLX files. The following command should do it: gxx dlxgen.cpp -o dlxgen.exe Once you have this program, you then need the object module for the loader. To get this, type: gcc -c dlxload.cpp Now, copy the file DLX.LD to your djgpp/lib directory. You should now be ready to make a DLX. You should start with the example program. To compile DLXTEST.CPP, use the following: gcc -c dlxtest.cpp dlxgen dlxtest.dlx dlxtest.o Then, compile DLXRUN.CPP and link with the dlx loader, and test it and see. (i think it might not work right now, oh well, the DLX code does, this is only a buggy EXAMPLE). Now, for the limits. -------------------- There are two major limits to DLX files: 1. No external variables, only functions (see below) 2. Calling dynamic functions from main EXE code is difficult. The first limitation might not be a limitation at all... I haven't tested it at all. If you feel like experimenting, feel free to uncomment the "#define __HACKME" near the top of DLXGEN.CPP. If it works, write me, I'd be interrested to know the results (see below for address). The second limitation is not really that bad. Just use your executable as a loader, and make a DLX hold your main code in it's LibMain initializer part... At the moment, error handling is a bit shaky... Other than that, though, it works great, and it will even dynamically link a bunch of DLX files at runtime. My project now has about 5 DLX's working together... About Contacting Me. -------------------- ONLY contact me in one of the following cercumstances: o You have spent in excess of 3 hours trying to get it to work and still have no luck. o You have written better docs or bug-fixes. o You have some example code. o You need code written. o You are a basement hacker and want to help Nanosoft... o You want somebody to listen to Microsoft-bashing... o You are lonely... ANNNND: MAKE SURE TO CONTACT ME IF: o You have free code for me. o You work for free. o You are lonely... (okay, so I already said it) BUT NOT: o If you wonder what DLX is. o You tried for 5 minutes to get it to work. o You didn't read all of this file. While I don't give tech-support as such, I may be able to help with something, and I would appreciate the feedback. Luke Bishop (lbishop@calvin.stemnet.nf.ca) CEO, Head Programmer, Nanosoft, Inc.