Solved

Use CodeDOM to add functionality to a Library class

Posted on 2003-11-13
2
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
dhodge earned 500 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

717 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