[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Use CodeDOM to add functionality to a Library class

Posted on 2003-11-13
2
Medium Priority
?
217 Views
Last Modified: 2012-03-15
Howdy everyone!

I've been hanging out with the Aspect Oriented Programming crowd, and they talk about doing runtime weaving where they add fields and functions to an already existing compiled class in the library using CodeDOM. However, I've been unable to find any source code for how this might be done.

I need code that will take an existing class and add functionality to it at runtime.

If a specific example is necessary, I'd like to take the base class Control and add a virtual function with the signature
 int minXSize();

Anyone have a clue how to do this, or if it's possible? The guys in AOP land say they are doing it, but again, I haven't seen any code.

I know this is a tough question, so I'm throwing out the big points.

-Kelly
0
Comment
Question by:kellycoinguy
2 Comments
 
LVL 2

Accepted Solution

by:
dhodge earned 1500 total points
ID: 9749763
Did you investigate VSA, I know it's not quite adding a function at run time however with a little rethought it could help.

For example you could add a public function to the base object that simply ran a script in a known place, thus you'd be kind of giving yourself the flexibility to add what ever you want to the code.

I am also very interested in CodeDOM and like you never got anywhere, I have had a little success with Microsoft.Vsa though.
0
 
LVL 1

Author Comment

by:kellycoinguy
ID: 10453476
Thanks for at least trying to answer the question dhodge... I know this is a very tough one.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month17 days, 17 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question