Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE337C6ED@probe-2.Acclaim-Euro.net> From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: The DXE mechanism - has anybody used it effectively? Date: Tue, 22 Dec 1998 17:07:44 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain Reply-To: djgpp AT delorie DOT com Laurence Withers writes: > 1 - can I create a large module, using several different input files? Yes. > 2 - if I pass a pointer to a function in my C++ code, can the DXE call > that function? Yes. All the DXE interface provides is a single pointer to some item that is exported by the DXE module, which your C or C++ program gets as the return value from _dxe_load(). It is up to you to decide what you want this pointer to represent: it could be just one function provided by the DXE module which your main program can call, or more usually it will be an interface structure that the DXE routine fills in, containing pointers to lots of different functions. This can work in either direction: the DXE can provide a structure containing NULL pointers, the main program can fill these in with the addresses of actual functions from itself or from libc, and then the DXE routines can call these functions via the pointers. This gets very boring if you want to call large numbers of libc routines from the DXE code (a lot of typing to export them all) but it is quite simple to do. > 3 - will I be able to call the DXE from C++ code (as opposed to C > code)? Connected with this, will I be able to write the DXE in C++? I've no idea: try it and see! Making a wild guess, probably the code will compile ok, but some things like global objects won't be initialised properly. Shawn Hargreaves.