![]() If it's a static class, that's a lot easier. This can be non-trivial, especially if the internal state contains private members. You would have to reflect class changes in the wrapper to the wrapped class. ![]() ![]() You would have to replace references to the original assembly with your new wrapper assembly. However, there are a few difficulties you'd have to overcome. You can certainly write an assembly which had a class that forwarded all of its method calls and internal state to other classes. The plugin dlls reference B obviously, so what I want to do is recreate B where I'm able to perform logging, etc. I want to make a wrapper dll for "B", so "A" can function with a wrapped version of "B", and might not even use the real version of "B" at all.ī also has static methods and other classes, I want to be able to redefine the signatures/declarations in this quasi-wrapper and have the "A" assembly use that instead. In managed C#, I have a dll called "A" that is a plugin for another application that has a class that derives from a class in another dll I called dll "B". In ordinary native libraries, I can wrap another dll and monitor calls by simply building a dll with the same exact function signatures in the export, and sometimes can even call onto the real dll.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |