Passing Streams to .NET

gbarringtongbarrington Member Posts: 2
edited 2006-04-27 in Navision e-Commerce
I am trying to pass an OutStream to a VB.NET object.

The Outstream gets created fine on Navision.
The call to the VB.NET object also goes fine, but as I step through the VB.NET code the parameter "var" has a type of System.__ComObject.

Does anyone know the underlying Type of this Object?

I have tried casting to byte[], Stream etc, but have had no luck. I need to extract the image from the parameter "var" in VB.NET.

Has anyone had any luck doing this? If so, how do I do it in .NET??

Navision Code is:



VB.NET Code is (Interface definition left out for clarity):
Public Function SetStream(ByVal val As Object) As Boolean
    SetStream = False
End Function


  • ara3nara3n Member Posts: 9,255
    I believe stream in Navision and in .NET are not compatible. The workaround is write the stream into a file and from .NET get the file and process it. I know it sucks in terms of performance, but it's the easiest, fastest way to do it.
    Ahmed Rashed Amini
    Independent Consultant/Developer

Sign In or Register to comment.