My is the order of parameters reversed for functions that are dynamically loaded from shared C libraries?
Andrea Fontana via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Nov 15 10:06:51 PST 2015
On Sunday, 15 November 2015 at 18:02:01 UTC, David Nies wrote:
> On Sunday, 15 November 2015 at 18:00:09 UTC, David Nadlinger
> wrote:
>> On Sunday, 15 November 2015 at 17:54:27 UTC, David Nies wrote:
>>> How can I make sure the order is correct?
>>
>> Whenever you use a C function, it must be marked as, even if
>> it's through a function pointer as in this case. Just apply
>> the attribute to the dll2_fn and dll3_fn declarations.
>>
>> Hope this helps,
>> David
>
> How do I mark it as such? Can you please give an example?
>
> Thanks for the quick reply! :)
I think he refers to this: http://dlang.org/interfaceToC.html
More information about the Digitalmars-d-learn
mailing list