How to marshall pointer to array inside struct
I have the following struct
Here
Recs
and Glyphs
are C like arrays iirc. I want to marshal them to managed ones but I get the following error
I am using LibraryImport
8 Replies
even if I made a custom marshaller, will my code actually compile? I think it doesn't like the type being an array at all.
ain't much useful copy-pasting a link with no further explanatory btw
hmm
I'll try
also @cap5lut https://discord.com/channels/143867839282020352/169726586931773440/1239284198968397935
what about this situation
cap5lut
if yes, there are inline arrays, tho u need a type for each size:
Quoted by
<@1010118213754949672> from #help-0 (click here)
React with ❌ to remove this embed.
on second thought, do I need to know
Rectangle* Recs
size in order to make a managed array/span?
like the span constructor takes length as a second parameter i remember@calledude you were right, after making my own marshaller I don't get error anymore
let's test
ive never touched interop with native myself, i cant help here, sorry
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
thats not supported yet by LibraryImport
afaik youd have to write a custom marshaller
or use DllImport which is what id recommend