use dll's

Michelle Long HappyDance321 at gmail.com
Sun Mar 17 03:05:51 UTC 2019


On Saturday, 16 March 2019 at 15:13:15 UTC, ontrail wrote:
> On Saturday, 16 March 2019 at 14:18:07 UTC, Andre Pany wrote:
>> On Saturday, 16 March 2019 at 12:53:49 UTC, ontrail wrote:
>>> hi,
>>> i created a program (windows) and 2 dll's.
>>> how do i use the 2 d-language dll's in a d-language program 
>>> with only one GC?
>>>
>>> any help is appreciated.
>>
>> It is explained here (section d code calling d code in dll)
>>
>> https://wiki.dlang.org/Win32_DLLs_in_D
>>
>> Kind regards
>> Andre
>
> well thank you kindly.
> what i don't understand yet, is there a way to have the GC in 
> my program only once instead of several times with the dll's.

Why do you need to do this? It might be more effective to allow 
multiple GC's.

but surely you can set the GC of the dll to use that of the 
another. You will need to expose a method to set the GC from the 
dll..

void SetGC(GC gc);

type of thing...

Where GC is info regarding the GC to do so which I don't know 
much about. The latest dmd supports hooking ones own GC so it 
might be just a matter of using those functions to point to the 
correct gc.

https://dlang.org/library/core/memory/gc.html

https://forum.dlang.org/thread/mzrxzdmhwuwjiybcbdsr@forum.dlang.org


More information about the Digitalmars-d-learn mailing list