D
DaTurk
Hi,
I'm coding up an application that has a native c++ layer,
asynchronously calling callback in a CLI layer.
We originally did this with static inline methods in the CLI layer,
but this solution only works with singleton objects. So I have to
explore other solutions.
So beside pinning pointers, I've been looking at GCHandle. I was
looking at this example from MSDN.
http://msdn2.microsoft.com/en-us/library/367eeye0(VS.80).aspx
They have two examples, one where the GCHandle has class scope, and
then another where it is static, and it's global.
My problem is that I need each CLI instance of this object to have
it's own GCHandle to it's own calback into the native world, will a
instance variable of GCHandle cover this?
I'm coding up an application that has a native c++ layer,
asynchronously calling callback in a CLI layer.
We originally did this with static inline methods in the CLI layer,
but this solution only works with singleton objects. So I have to
explore other solutions.
So beside pinning pointers, I've been looking at GCHandle. I was
looking at this example from MSDN.
http://msdn2.microsoft.com/en-us/library/367eeye0(VS.80).aspx
They have two examples, one where the GCHandle has class scope, and
then another where it is static, and it's global.
My problem is that I need each CLI instance of this object to have
it's own GCHandle to it's own calback into the native world, will a
instance variable of GCHandle cover this?