[DllExport("CheckParamsByRef", System.Runtime.InteropServices.CallingConvention.StdCall)] /// <summary> /// CheckParamsByRef /// <param name="test">The string to return by reference</param> public static int CheckParamsByRef(ref String test) { test = "Hello from C#"; return 1; }and try to call it from VFP
DECLARE integer CheckParamsByRef IN "MyDLL x86.dll" ; string @ ReturnValueText = "" ? CheckParamsByRef(@ReturnValueText) ? 'ReturnValueText: ' + ReturnValueTextOn the ? CheckParamsByRef call I'm getting exception from DLL.