Mail Archives: djgpp/1998/12/22/12:10:14
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.
- Raw text -