OLEObject: Failed to retrieve the return value by Ref

Hello, everyone…

I got an issue transfer from VB6 to RB2012 that I tried to declare a dll file, but it wouldn’t work.
So, I was using the following code, and it works:

“RepairAddress” doesn’t need any return message ByRef, so there was no problem.

There is another function called:

Now here is my trouble. I tried hard to get the value from VarRecordCount and VarDescritption, but didn’t work.
No matter how many ways I tried, “RecordCount” was shown as 0 always. (It prompt “Done” without any problem.)
Here is my code:

Is there anyway that I can retrieve the return value By Ref from dll??
Thank you very much.

I did a search on internet. I think and I guess realbasic does not support ByRef. Am i right?

You might want to use this:

If the optional parameter ByValue is True, property assignment is by value.

Dim RecordCount As Int64

VB6 LONG Integer type equates to XOJO Int64

by default Integer is Int32

and yes XOJO supports ByRef very welll

Thank you both of you. I will have a try on Monday. Thank you again!