I tried to access a COM method by using a code like obj.Do("text") while Do is a method in obj which takes a ref string as its input (obj is a .COM object, written in VB6). However it always throw a COMException type mismatch. I tried passing obj.Do(ref a) while a is a string variable but it didn't work either.
The VB code looks like this
Function Generate(sDestinationFile As String)
....
Exit Function
Do you know what causes this and how should I work around it?