On Fri, Mar 14, 2014 at 7:23 PM, Miro Karpis <miroslav.karpis@gmail.com> wrote:
here comes the c definition:

int setmodulestring(char* parameter, int parameterLength, char* value, int valueLength, int setVarInArray);

If you had included this before (or perhaps noted that I specified Win32 API, not general C function) then I wouldn't have raised the CWString issue. This declaration is not Win32 API and the original CString was correct for it.

If you're still having issues... does this by any chance have any association with threads? ghci uses the threaded runtime *and* handles threads slightly differently from compiled code with -threaded (if it core dumps in ghci with -no-ghci-sandbox then this may be the issue)?

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net