The problem is I have an instance of an object from a COM that has a method that takes a string ByRef. The actual string that gets passed in gets manipulated by the method. The code worked fine in vb6 when string conversion to different formats were available using vbFromUnicode and vbUnicode. .NET only allows unicode strings. You can convert a string to ansi but what you get back is a byte array not a string. The method only accepts strings. DllImport and Declaring the function as ansi doesn't work because this is an instance method not a static method. Does anyone know a work around for this? I really need to pass an ansi string into this method but all i can pass is a unicode sting.

ex:

Dim foo as someComObject
foo.method(myString) ' unicode when it should be ansi

Thanks in advance.

Ed