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