Jon,
I've created a HANDLE[] in a managed class:
pHandle = new HANDLE[2];
where pHandle is HANDLE* defined in my __gc class
Is this an unamanged or a managed pointer? I would have thought it would
be unmanaged but I can __pin it, which implies it is managed.
That depends on how you look at it:
The memory referenced by pHandle is *unmanaged*, since it is stored in the
CRT heap. However, the memory pHandle itself is stored is actually in the GC
heap, since it is part of a reference object.
If you needed to pass &pHandle to an unmanaged function, then you'd
certainly need to pin it first...
--
Tomas Restrepo
to****@mvps.org