I've tried to use the system.runtime.interopservices.marshal but with no better results. I can use the Copy method to copy the data to an unmanaged memory pointer, but I don't know if is possible to pass this pointer to the function and how to do it.
The function definition is
Public Overridable Sub myFunction(ByRef ar As Integer)
The most annoying part is that with vb 6 it works fine, so I thought that it was a common migration issue... : (
Any idea? I can't change the receiving end.