The code generates an access violation error when trying to execute TFoo methods that are private (just change to public to work as espected).

The code generates an access violation error when trying to execute TFoo methods that are private (just change to public to work as espected).

How can I solve this without changing the visibility of TFoo methods?

https://gist.github.com/dipold/7b871788222dd7eb94962a9cc92d2e9a

Comments

  1. Thank you!
    Would you know to answer my comment in the middle code as well?

    ReplyDelete
  2. The funny about this access violation above, is that it occurs in the following line in System.Rtti.TRttiIntfMethod.DispatchInvoke(), where it have the following comment:

    CheckCodeAddress(code); // should never happen, I believe

    ReplyDelete
  3. I upgraded the code in the gist to something closer to the real scenario.

    The goal is to create a proxy for ORM lazy loading associations.

    I just wondered if there is a way to optimize the commented code in the gist.

    ReplyDelete

Post a Comment