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

Matthew Metnetsky met at uberstats.com
Thu Apr 20 21:31:55 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gonzalo Paniagua Javier wrote:
> 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.
> 
> libgdiplus already does something like this. I would use that approach
> plus some buffering to avoid switching from/to managed whenever
> possible.

Thanks for the heads up.

Apparently libgdi doesn't support GdipLoadImageFromStream and
GdipSaveImageToStream as stream is an IStream (COM).

I'll take a look into IStream's and see what sort of structure it might
be.....

~ Matthew
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)

iD8DBQFESDYLLrcoBjlTBf0RAufGAKCBOvtZ/fT6lfOAyXTYkDaCHhDZeACgmqXc
BDQjis1qDT392m0AIYrwMJs=
=Ym5u
-----END PGP SIGNATURE-----


More information about the Mono-list mailing list