| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2004.03.09 19:03 "Re: C# Wrapper", by Bob FriesenhahnOn Tue, 9 Mar 2004, maillist@iter.dk wrote: > Has anyone got a C# wrapper for the libtiff library? > > I have managed to wrap a few of the functions, but have problems with > wrapping _TIFFmalloc, since I > don't know how to handle the void* type that is returned. The easiest way to create a C# wrapper is by implementing it in C++, and expose the interfaces as a class by using "Managed C++". The void* type is a native type in C++. For safety's sake, C# shouldn't be exposed to C pointers. In fact, the .NET run-time will not allow managed code (i.e. C#) to access data allocated from the C/C++ heap. It is not difficult to marshal raw image data into the GDI+ image representation used by C#. Bob ====================================== Bob Friesenhahn bfriesen@simple.dallas.tx.us http://www.simplesystems.org/users/bfriesen |
|||||||