On Monday, 14 September 2015 at 16:59:20 UTC, Adam D. Ruppe wrote:
On Monday, 14 September 2015 at 15:44:36 UTC, Taylor Hillegeist wrote:
So, Actually I am using NI LabVIEW to interact with my DLL. I imagine even getting hold of of that would troublesome or expensive.

Ah, all right. Here's a SO thing (followed up by email then

Fortunately I am working with Win7, And the below function seems to work beautifully.

export extern (Windows) void SayHello(Variant *Input_Variant)
{
        string A = "HELLO WORLD!";
    Input_Variant.CA_VariantSetCString(A.ptr);
}

My goal was to store variants in an associative array Variant[string] and use this as a portable interpreter returning the resulting Variant.

but that runs into some memory questions that I am not as savvy with.

1. Memory:
I need to manage memory from the dll. I can give the caller a pointer to manage, but I don't think that is visible from gc. There should be different associtive arrays for different objects in the caller. How do I manage this?

2. Threads:
I would like this to be as parallel as possible one objects call to its data should not hinder anothers.

I have seen on the Memory managment page http://wiki.dlang.org/Win32_DLLs_in_D but I would like to know more.



Reply via email to