On Monday, 9 July 2018 at 10:33:03 UTC, Andre Pany wrote:
Hi,
I need to call a C function within a DLL which has following
signature:
void GetParamNames (const char *paramNames[], size_t
numParams);
The purpose of this function is to return a list of texts
I defined in D:
extern(C) GetParamNames (const char[]* paramNames, size_t
numParams);
Is this correct? How can I call the function? I tried several
possibilities but
always get a runtime crash.
Kind regards
André
Hi, no it's not correct i think, right translation would be
extern(C) void GetParamNames(const char** paramNames, size_t
numParams);
If you use the D array syntax you'll get into troubles because of
ABI i think.
Baz.