The current way aiImportFileFromMemory is wrapped doesn't seem sane. The native function looks like this:
ASSIMP_API const aiScene* aiImportFileFromMemory ( const char * pBuffer,
unsigned int pLength,
unsigned int pFlags,
const char * pHint
)
swig generates this .NET method:
public static aiScene aiImportFileFromMemory(string arg0, uint arg1, uint arg2, string arg3)
I think swig wraps const char * as .NET string. This cannot work as a .NET string is not for storing binary data. What's required here is a byte[] array.
Even in C++ the signature is confusing. While a char * may be more convenient inside the function to do pointer calculations the signature should use void* to make it very clear that a chunk of binary data should be passed in.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
You might want to try this .NET wrapper instead, it doesn't use SWIG:
http://code.google.com/p/managed-assimp/
see https://github.com/assimp/assimp/issues/150