Thank you! I actually used result = DPL()
because it has several fields to be populated (I cut down the example). I have also switched to not giving the path to the DLL, and now use when instead of if for the isMainModule test. Incidentally (but related), the WideCString type doesn't seem to be in the docs, or rather it only appears as a function argument. Might be worth adding an index entry for wchar_t* to link to WideCString, and of course, to document it. Anyway, I'll be trying it out later on today...