SaveInstanceTreeS
Syntax
// // Strong typing definition // int64_t SaveInstanceTreeS( OwlInstance owlInstance, const void * callback, int64_t size ); // // Weak typing definition // int64_t __declspec(dllexport) __stdcall SaveInstanceTreeS( int64_t owlInstance, const void * callback, int64_t size );
Property owlInstance
Size: 64 bit / 8 byte (value)Property callback
Size: 64 bit / 8 byte (reference)Property size
Size: 64 bit / 8 byte (value)
Example (based on pure API calls)
Here you can find code snippits that show how the API call SaveInstanceTreeS can be used.
#include "./include/engine.h" #include <assert.h> const int_t BLOCK_LENGTH_WRITE = 20000; // no maximum limit FILE * myFileWrite = nullptr; void __stdcall WriteCallBackFunction(unsigned char * content, int64_t size) { fwrite(content, (size_t) size, 1, myFileWrite); } void SaveInstanceTreeByStream(int64_t myInstance, wchar_t * fileName) { assert(myFileWrite == nullptr); _wfopen_s(&myFileWrite, fileName, L"wb"); if (&myFileWrite) { SaveInstanceTreeS(myInstance, &WriteCallBackFunction, BLOCK_LENGTH_WRITE); fclose(myFileWrite); } else { assert(false); } }