Re: BeginInvoke on a delegate

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Charles Wang [MSFT]" wrote:
Hi Bob,
Your analysis is correct. The problem here is that the native type
object "myClass" is passed as a parameter to BeginInvoke. There are
two ways to work around this issue, one is changing your MyClass type
from native to managed, and the other one is using a wrapper managed
class to wrap your native type object. For example:

In case writing a new ref class is overkill, consider just using
System::IntPtr.


.