Closed ymbus closed 4 years ago
Your expected region does not contain initialized data due to other address in heap. Well, looks like
................. (X) <--- addr1
addr2 --->
just encapsulate this inside any immutable addr where your caller can get related data via the same pointer, or just use new allocated addr. Also don't forget to release all allocated resources when it will no longer be necessary to use
edited: something wrong with github email reply
I want to export a structure from C# to an unmanaged delphi application, that I can not change.
The structure in unmanaged looks like this:
The unmanaged code calls the exported C# function with a pointer to the TDCRecList struct -> PDCRecList: definition:
call:
getArrayStruct(dRecList); //pointer will be 'nil' -> a nullpointer
I did not manage to export the structure in C#. In delphi dRecList will be null. I am using an array with size of only 1 at this point. What I have is this:
My export function looks like this:
As said, in delphi there will be a nullpointer and I don't know why.
Can you please help me? How would you do it?