[Mono-list] Sharing Streams between managed and unmanaged code

Gonzalo Paniagua Javier gonzalo at ximian.com
Thu Apr 20 17:53:17 EDT 2006

On Thu, 2006-04-20 at 16:10 -0500, met at uberstats.com wrote:
> I have a relatively large C library that I do not want to reproduce in C#. Its
> core functionality (for better or worse) is based around reading/writing a very
> specific XML format. XML is created using libxml2's xmlWriter and parsed via
> libxml2's XmlReader like interface. My goal is to expose this functionality to
> .NET via streams.
> Essentially, I would like to be able to write XML to a .NET stream (say asp.net
> response) as well as read XML (from an asp.net request) from unmanaged code.
> Any suggestions on the best way to get this done would be greatly appreciated.

libgdiplus already does something like this. I would use that approach
plus some buffering to avoid switching from/to managed whenever


More information about the Mono-list mailing list