|If it is Utext that you trying to return then it is the ByVal directive that is causing the problem.|
Replace it with ByRef and it should work.
Or alternatively put the command ctext = Utext as the end of the function and the value will be returned to the calling function providing you ask for it with the command ReturnString = ctect(utext)
Having said that I believe that with VB.Net the ByVal directive is superfluous as parameters are passed ByVal by default to conform to C++ calling conventions.
In VB6 values are passed ByRef by default and if you want to only pass the value then you need to use the ByVal directive. Either way using the ByVal directive does just that and only passes that value and not a reference to the value which is what you need.