B
Bien
Would someone mind helping me with a DllImport call to zlib 1.2.1?
I've tried several alternatives such as SharpZipLib, but they won't
work for what I'm doing. I have it sort of figured out, but it gives
errors sometimes such as "Object reference not set to an instance of
an object". I think it has something to do with zlib needing the
pointers to my variables, and I can't figure out how to give it the
pointer to a byte array. In the C++ header file for zlib the
uncompress function is listed as:
ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, const
Bytef *source, uLong sourceLen));
This was working, but was causing errors when extracting some files
like I said above:
[DllImport("zlib1.dll")]
static extern int uncompress(byte[] destBuffer, uint destLen, byte[]
sourceBuffer, uint sourceLen);
Thanks!
I've tried several alternatives such as SharpZipLib, but they won't
work for what I'm doing. I have it sort of figured out, but it gives
errors sometimes such as "Object reference not set to an instance of
an object". I think it has something to do with zlib needing the
pointers to my variables, and I can't figure out how to give it the
pointer to a byte array. In the C++ header file for zlib the
uncompress function is listed as:
ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, const
Bytef *source, uLong sourceLen));
This was working, but was causing errors when extracting some files
like I said above:
[DllImport("zlib1.dll")]
static extern int uncompress(byte[] destBuffer, uint destLen, byte[]
sourceBuffer, uint sourceLen);
Thanks!