In general, an argument passed to a reference parameter denotes the actual storage location of the argument. However, Visual Basic 7.0 in several cases will use copy-in/copy-out semantics to permit passing arguments to reference parameters when the types do not exactly match or the argument has no storage location. Copy-in/copy-out semantics are accomplished by coercing the value to the parameter type, storing the value to a temporary of the appropriate type and passing a reference to the temporary. On the return from the method, the value in the temporary is coerced back to the type of the original value and stored in the original location.
The three cases when copy-in/copy-out is used are:
Object
.