I'm not sure what the issue is - you should be able to pass a Single directly to .NET:
If I have a method like this:
public Single PassSingle(Single number) {return number + 10.2F; }
I can call it directly with:
? loNet.PassSingle(10)
So that works.
What doesn't work if you need to pass a Single as part of an InvokeMethod() call because FoxPro again can't cast to Single explicitly.
The following demonstrates this logic:
*** Passing Single - Single is supported in VFP and direct calls work *** but you can't cast it in InvokeMethod calls *** so ComValue is required *** Works ? loNet.PassSingle(10.2) *** This doesn't work as FoxPro can't cast to Single *? loBridge.InvokeMethod(loNet,"PassSingle",10.2) loComValue = loBridge.CreateComValue() loComValue.SetSingle(10.2) ? loBridge.InvokeMethod(loNet,"PassSingle",loComValue)
So... I added SetSingle() to ComValue now and that does make it work.
Updated .dll attached.
+++ Rick ---