> I am using an unmanaged pointer and need to take the address of this
> and pass it to a function (a pointer to a pointer). If the pointer is
[quoted text clipped - 26 lines]
> from a member function in CMyClass. MyFunc(&gDev) will work fine
> though.
You need a pinning pointer for that I think, and I only know how to do that
with C++/CLI. The syntax you are using is obsolete and the Managed
Extensions for C++ that used that syntax are buggy and have no future.
The reason what you are doing doesn't work is that when the data is inside a
managed class, it is in the garbage collected heap, and can move around at
any time.