Allow the calling of .Net instance methods from c++ #109486
Replies: 1 comment 1 reply
-
It seems a previous issue ( #12040 ) also addressed a similar request.
Does this mean that it is possible to use the GCHandle to access and invoke methods on the object in question? Until I saw the referenced issue I had assumed that the GCHandle was limited to providing a means to prevent C# objects from being cleared up whilst another environment (c++) was still using them. If it can be used to access and invoke instance methods, I would be very interested in this as I believe already have a GCHandle to my instanced object. (FYI: I have this through an existing call to the constructor (.ctor) of the object I'd like to call instance methods on.) |
Beta Was this translation helpful? Give feedback.
-
Firstly many thanks to @jkotas for his most helpful answer over here -> #99203
Possibly this previous question/answer will provide some additional context for this idea.
Currently I can...
coreclr_create_delegate
and retrieve the address of a static c# methodI would very much like to be able to do the same with instance methods.
It seems that the
coreclr_create_delegate
does not support this at present.I would very much like to be able to do this. (through this call, or another if more appropriate.
Is there any interest within the current set of developers in making this work?
Alternatively, is there a recommended path to learn about this area, that I might help to make this a reality.
Many thanks in advance for any help in this area.
Beta Was this translation helpful? Give feedback.
All reactions