Can D DLL work in SAS?

I read D Cookbook and the following sentence appeared next to it:

D is binary compatible with C, but not compatible with source code.

SAS allows users to define and call C functions from SAS . But I wonder if it is possible to do this with D as well?

I found Adam Rupp's answer for creating a DLL here , and I tried to use it to create a sample DLL from the SAS documentation; however, whenever I find it to be called, the dll boots up and then the SAS goes down (without the alarm log that I can find).

+5
source share
1 answer

Yes, you can write DLLs in D that use or implement the C API.

You must ensure that the function signatures and conventions match. On the page you linked, the calling convention is indicated as stdcall , so your D functions must be annotated using extern(Windows) or extern(System) .

+7
source

Source: https://habr.com/ru/post/1202673/


All Articles