Board index » delphi » Delphi 2.0 And VC++ DLL Usage

Delphi 2.0 And VC++ DLL Usage

Hi,

This is a tricky one. I am using Delphi 2.0 to call some routines in a
VC++ DLL. The DLL routines return pointers to memory blocks that I must
free. How do I do this?

Many thanks

Mark Brooks (ma...@vip.co.uk)

 

Re:Delphi 2.0 And VC++ DLL Usage


In article <32908758.7...@vip.co.uk> of Mon, 18 Nov 1996 16:57:12 in
comp.lang.pascal.borland, Mark C Brooks <ma...@vip.co.uk> wrote:

Quote
>This is a tricky one. I am using Delphi 2.0 to call some routines in a
>VC++ DLL. The DLL routines return pointers to memory blocks that I must
>free. How do I do this?

By asking only in Delphi newsgroups.

--
John Stockton, Surrey, UK.  J...@merlyn.demon.co.uk  Turnpike v1.12  MIME
    http://www.merlyn.demon.co.uk/

Re:Delphi 2.0 And VC++ DLL Usage


Quote
Mark C Brooks wrote:

> Hi,

> This is a tricky one. I am using Delphi 2.0 to call some routines in a
> VC++ DLL. The DLL routines return pointers to memory blocks that I must
> free. How do I do this?

> Many thanks

> Mark Brooks (ma...@vip.co.uk)

I'm afraid you are missing something... :) If you want to kill your
program
very fast - allocate something in DLL with new, malloc, GetMem,
whatever, pass
this pointer back to application and try to free it there :)))

What it could be that DLL allocates memory with GlobalAlloc, but then
you should
get memory handle, not pointer... So check it out again

Cheers
  Dmitri

--
-------------------------------------------------------------------
           Sh.t happens, but why it always happens to us?
-------------------------------------------------------------------
 Dmitri Poujlivyi                        dmi...@god.bel.alcatel.be
-------------------------------------------------------------------

Other Threads