From: "Edmund Horner" Newsgroups: comp.os.msdos.djgpp References: <3994FC92 DOT B2795AF1 AT addr DOT com> Subject: Re: Another DXE question Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Organization: Paradise Net Message-ID: <966343147.283755@shelley.paradise.net.nz> Cache-Post-Path: shelley.paradise.net.nz!unknown AT 203-96-149-240 DOT tnt1 DOT paradise DOT net DOT nz X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) Date: Tue, 15 Aug 2000 16:46:14 +1200 NNTP-Posting-Host: 203.96.152.26 X-Complaints-To: newsadmin AT xtra DOT co DOT nz X-Trace: news.xtra.co.nz 966343167 203.96.152.26 (Wed, 16 Aug 2000 00:39:27 NZST) NNTP-Posting-Date: Wed, 16 Aug 2000 00:39:27 NZST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com The typical method of using external functions in a DXE is to pass a structure containing pointers to those functions to the DXE. For example: struct IMPORTS { size_t (* malloc) (size_t); void (* free) (void *); } imports; dxe = _dxe_load ("alloctest.dxe"); dxe (&imports); Inside the DXE you can use (for example): void alloctest (struct IMPORTS *imports) { char *x; x = imports->malloc (100); imports->free (x); } This is the way I do things... "Ardy Falls" wrote in message news:3994FC92 DOT B2795AF1 AT addr DOT com... > To get around the unresolved externals problem could you somehow > combine a cpp file with a object file? > the reason I'm asking is because I am making a graphics lib where you > can dynamically load in drivers that are specific to the users video > card and a lot of the functions are asm files that are turned to .o > files using nasm. > Thanks > Ardy > http://www.addr.com/~ardy/ >