[Mono-list] interop help (explanation)

Bob Smith bob@thestuff.net
Thu, 8 Nov 2001 12:05:37 -0500 (EST)


I think you need to tell the garbage collector to pin the objects in place
so they wont move on you. MSDN has an article on it I beleave.

On Wed, 7 Nov 2001, Lloyd Dupont wrote:

> i have interop code to which i pass delegate (callback function) and it
> return me a structure pointer as an IntPtr in C# (holding the value of
> my callback)
>
> later i use my structure(C# IntPtr) to call native which call the
> callback (delegate) but it sometimes appear that tyhe runtime should
> have moved some info about my delegate and callback call some times fail...
>
> what could i do to besure my callback won't move.
> they are static value of some class but this seems to be not sufficient,
> anyone has an advice ? clues ....
>
> any help much appreciate,
> thanks !
>
>
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>