Message-ID: <39998E7F.E1E2E915@addr.com> From: Ardy Falls X-Mailer: Mozilla 4.74 [en]C-CCK-MCD NSCPCD47 (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Another DXE question References: <3994FC92 DOT B2795AF1 AT addr DOT com> <966343147 DOT 283755 AT shelley DOT paradise DOT net DOT nz> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 41 Date: Tue, 15 Aug 2000 11:39:59 -0700 NNTP-Posting-Host: 63.196.4.62 X-Complaints-To: abuse AT pacbell DOT net X-Trace: news.pacbell.net 966364893 63.196.4.62 (Tue, 15 Aug 2000 11:41:33 PDT) NNTP-Posting-Date: Tue, 15 Aug 2000 11:41:33 PDT Organization: SBC Internet Services To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I tryed to do this with __dpmi_int and it cause my computer to crash. why? Edmund Horner wrote: > 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/ > >