Все вопросы: [memory-layout]
4 вопросов
What is the memory layout of a Delphi dynamic array of dynamic array of X?
I am trying to call a procedure in a Delphi DLL from C#. The procedure expects the caller to preallocate and input an array of array of TSomeRecord, of which it will then manipulate the TSomeRecord elements as a means of returning results. So, I need to hand-craft Delphi dynamic arrays of arrays ...
Object layout in case of virtual functions and multiple inheritance
I was recently asked in an interview about object layout with virtual functions and multiple inheritance involved. I explained it in context of how it is implemented without multiple inheritance involved (i.e. how the compiler generated the virtual table, insert a secret pointer to the virtual ta...
неправильный порядок членов в структуре C #
У меня есть TCP-клиент, который помещает пакет в структуру using System.Runtime.InteropServices; [StructLayoutAttribute(LayoutKind.Sequential)] public struct tPacket_5000_E { public Int16 size; public Int16 opcode; public byte securityCount; public byte securityCRC; publi...
Класс переменного размера - C ++
Я видел класс, который определяется таким образом .. class StringChild : public StringBase { public: //some non-virtual functions static StringChild* CreateMe(int size); private: unsigned char iBuf[1]; }; Статическая фабричная функция имеет следующую реализацию: ret...