I'm looking for a wrapper implementing an ADODB.Stream interface and
supporting a System.IO.Stream (ADODB2NETStream).
I have taken the interface Stream from ADODB but struggled with the
ADODB.Stream.CopyTo(objMyADODB2NETStream, ...). I get an
InvalidCastException there. Implementing of
System.Runtime.InteropServices.ComTypes.IStream was also out of success.
C#.NET:
class ADODB2NETStream :
ADODB.Stream {
//...
}
Class ADODB2NETStream
Implements ADODB.Stream
'...
End Class
Using sample:
ADODB.Stream objAStream = new ADODB.Stream();
System.IO.MemoryStream objNStream = new System.IO.MemoryStream();
ADODB2NETStream objA2NStream = new ADODB2NETStream(objNStream);
objAStream.WriteText("Test");
objAStream.CopyTo(objA2NStream, 1);
Who has a solution or good hint to get it working?
Regards from Berlin
Holger