www.delorie.com/djgpp/v2faq/faq185.html | search |
| Previous | Next | Up | Top |
Q: Can I make a DLL using the DXE support?
Q: Where can I find information or examples about writing/loading the DXE files?
Q: Why do I get undefined references when I run dxegen
?
A DXE cannot link in any library functions which reference static variables (or which call other routines which reference static variables); this effectively prohibits linking in I/O functions,
allocating memory, and many other useful things. If you do call any of these, you'll get unresolved externals from dxegen
. To work around this limitation, introduce an array of
function addresses which will be used from the DXE at run time to call the "special" routines you cannot link in. Then arrange for the address of this array to be returned by _dxe_load
when it loads the DXE, and make the init routine fill the array with the actual addresses of those "special" functions.
Unloading a DXE is also not supported (but I'm told you can add this by making a few simple changes in the C library).
The only place you can find some docs and examples of writing and using a DXE is in the "tests" archive. The example there is exceedingly simplistic, but then so is the entire DXE mechanism...
webmaster donations bookstore | delorie software privacy |
Copyright © 1998 by Eli Zaretskii | Updated Sep 1998 |
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)