You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to import them over using PInvoke so I wrote custom marshallers for DataType1 and DataType2 etc. Now I want to create marshaller that take a pointer to something like the ListResult<TResult> below and give me an array TResult[] or a list List<TResult>.
I tried using the stateless unamanged to managed shape and its guaranteed variation but could not get it to work. I'm honestly having a hard time understanding the big picture especially how the marshaller shapes work for collections (i.e. which CustomMarshaller combinations should I be using, how I should be implementing GetManagedValuesDestination or GetUnmanagedValuesSource for my ListResult) even after reading the documentation and the corresponding tutorial. I'd really appreciate it if you could point me towards a reference implementation or a guide etc.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a project where we have a few C APIs that are shaped like these:
I want to import them over using PInvoke so I wrote custom marshallers for
DataType1
andDataType2
etc. Now I want to create marshaller that take a pointer to something like theListResult<TResult>
below and give me an arrayTResult[]
or a listList<TResult>
.I tried using the stateless unamanged to managed shape and its guaranteed variation but could not get it to work. I'm honestly having a hard time understanding the big picture especially how the marshaller shapes work for collections (i.e. which
CustomMarshaller
combinations should I be using, how I should be implementingGetManagedValuesDestination
orGetUnmanagedValuesSource
for myListResult
) even after reading the documentation and the corresponding tutorial. I'd really appreciate it if you could point me towards a reference implementation or a guide etc.Beta Was this translation helpful? Give feedback.
All reactions