DLLs
- salil_bhagurkar
- Member
- Posts: 261
- Joined: Mon Feb 19, 2007 10:40 am
- Location: India
I will give you a basic reply from my restricted knowledge: A DLL basically holds the functions that the program can use during runtime.. So what you could do is define the functions within the DLL and then have structures that mention the addresses of these functions (pointers). So when a DLL is loaded by your program the structures for the corresponding functions within your program will now be replaced by the ones in the DLL. So the pointers of the actual functions are loaded and you can call them...
- jerryleecooper
- Member
- Posts: 233
- Joined: Mon Aug 06, 2007 6:32 pm
- Location: Canada
You can load your dll on the kernel side, or on the program side. On the kernel side, you make new syscall on runtime for your dll, or one declared syscall that you decided that this one will be for this package. And the parameters will be the command, and its parameters. THe advantage will be that the dll will run at the same cpl as the kernel, so if the dll implement a driver or extend one, it runs faster. Or you can have a dll that is loaded in program space, running in the same memory as the program, which I think is how windows work, LoadLibrary("RichEdit.dll") as an example. It's advantage by running côte-à -côte with the program is that it is not penalized by slow interprocess communication, and if it crash, only it and the program crash, and not the whole system.
For loading a dll you need proper floppy disk driver or other storage device driver, to load your code, after that you decide of the file format of your dll, or you take one which already exist, that will skip you from writing new tools.
For loading a dll you need proper floppy disk driver or other storage device driver, to load your code, after that you decide of the file format of your dll, or you take one which already exist, that will skip you from writing new tools.