Handle ref and out parameters.