Forum: Object-Pascal / Delphi-Language
by Zacherl,
28. Jan 2019
Nope. It fills the memory described by the pointer with the list elements. In C/C++ int* is basically the same as int. The struct size is ofc. the same, but the number of elements in the array might be different each time, so you have to alloc enough space to prevent buffer overrides (thats what happening without the *count).
Forum: Object-Pascal / Delphi-Language
by Zacherl,
28. Jan 2019
size_t is a plaform and architecture specific type ... using UInt32 might not be correct e.g. for 64-bit. The real problem is this part tho: GetMem(LUserEntity, pCount); It has to be GetMem(LUserEntity, pCount * SizeOf(UserEntity));