When compiling in unicode mode and trying to interface to an ascii based .dll I have a problem where structure offsets are modified for me (due to character width adjustments). I settled on this solution, but it seems too ugly for me and I was hoping that someone else could point out a solution I've overlooked:
Since native strings will always be 2bytes/char in unicode mode, so will fixed length strings.
Just store them as fixed byte arrays and use PeekS/PokeS.
I was looking for a way to see whats allocated behind the scenes for me in case I can't figure out from docs/examples. Something like valgrind in the C world. If I 'leak' something because of bad assumptions, I'd like to figure it out without spending tons of time searching
or posing questions that would probably be of little interest.
If I had something like that, I could see when/if to use all of the various things like AllocateStructure/InitializeStructure/AllocateMemory, etc .... There is 0 documentation on use cases for those things and I need to experiment to answer my own questions - but I don't want to do it willy nilly. I guess I could disassemble them to figure it out too. You might be able to tell that, my 'native tongue' is C/asm where you have lots of control over memory OR the ownership of such things is clearly communicated.
In any case, my questions have been answered fully, thanks for your help!