The C ++ built-in library used in the C ++ / CLI project raises events giving me results,
- If I try to handle the event by extending the unmanaged event, it says that the ref class can only extend the ref class.
- Then I tried to create my own event, but an object was marked in it to collect the results, but I get that the error cannot declare a managed object in an unmanaged class.
Is there a way to do this one of the ways I'm trying, or to declare unmanaged result objects, populate them in an unmanaged event, and then Marshall?
Edit:
class MyNativeListener: public NativeEventListener { private: ManagedResultsObject ^_results; public: void onEndProcessing(ProcessingEvent *event) { _results.Value = event->value;
This is what I'm trying, I expanded my own event listener to capture an event, but not sure how to capture the results into a managed entity.
Edit2 This was detected when searching on the same line as suggested by @mcdave auto_gcroot
source share