Click here to Skip to main content
16,005,552 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralEnums for return values... Pin
Ray Cassick12-Sep-02 18:08
Ray Cassick12-Sep-02 18:08 
GeneralRe: Enums for return values... Pin
Nish Nishant12-Sep-02 18:58
sitebuilderNish Nishant12-Sep-02 18:58 
GeneralRe: Enums for return values... Pin
Heath Stewart19-Sep-02 11:44
protectorHeath Stewart19-Sep-02 11:44 
GeneralRe: Writing a code enhancer Pin
Joao Vaz12-Sep-02 4:16
Joao Vaz12-Sep-02 4:16 
GeneralRe: Writing a code enhancer Pin
psatvz13-Sep-02 5:22
psatvz13-Sep-02 5:22 
GeneralRe: Writing a code enhancer Pin
Joao Vaz13-Sep-02 5:52
Joao Vaz13-Sep-02 5:52 
GeneralRe: Writing a code enhancer Pin
psatvz13-Sep-02 6:21
psatvz13-Sep-02 6:21 
GeneralRe: Writing a code enhancer Pin
psatvz16-Sep-02 23:38
psatvz16-Sep-02 23:38 
Ok, no that I know how to do this (thanx to the tips I got here) I came up with a new idea, based on this, witch leads to a antoher question, namely:

Is it possible to change/enhance the once allready loaded code for a given type, during runtime?

My guess is no (since it seems like to much of a risk to allow such a thing), but I have to assure that it can't be done until I can drop it, since it would be such a great solution to what I am trying to solve. So, what I would like to do is basically this:

* A type is loaded into memory, and all metadata allong with it (methodtables etc etc).
* My enhancer code (allready in memory) is 'nofified' of this loaded type (this, I allready know how to do).
* My enhancer code detects that this type has a property/method X that qualifies for 'enhanced' logic (know how to do aswell).
* My enhancer code looks up the memory where the IL-code for the property/method X resides (I think I know how to do this, but I'm not sure).
* My enhancer makes sure that code is 'enhanced' with the right features, and when the property/method X is invoked, the 'enhanced' code is executed by the runtime instead of the original code.

The difference between this and my first approach (witch I now know how to do) is that the code-enhancing is carried out in memory, and my first approach was parsing the IL-code on disk (e.g without loading the types that where to be enhanced), enhanced it and then wrote the enhanced code back to disk.

Any help highly appreciated!


/psatvz
GeneralRe: Writing a code enhancer Pin
James T. Johnson17-Sep-02 1:30
James T. Johnson17-Sep-02 1:30 
GeneralRe: Writing a code enhancer Pin
psatvz18-Sep-02 0:03
psatvz18-Sep-02 0:03 
GeneralRe: Writing a code enhancer Pin
psatvz18-Sep-02 5:09
psatvz18-Sep-02 5:09 
General.net embedded Windows Form Pin
Eric Lacroix11-Sep-02 18:07
Eric Lacroix11-Sep-02 18:07 
GeneralEnumerating an Enum Pin
Jamie Nordmeyer11-Sep-02 10:41
Jamie Nordmeyer11-Sep-02 10:41 
GeneralRe: Enumerating an Enum Pin
David Stone11-Sep-02 15:59
sitebuilderDavid Stone11-Sep-02 15:59 
GeneralRe: Enumerating an Enum Pin
Jamie Nordmeyer11-Sep-02 18:09
Jamie Nordmeyer11-Sep-02 18:09 
GeneralRe: Enumerating an Enum Pin
Heath Stewart19-Sep-02 11:47
protectorHeath Stewart19-Sep-02 11:47 
GeneralNews about generic Pin
elnino10-Sep-02 7:05
elnino10-Sep-02 7:05 
GeneralRe: News about generic Pin
Joao Vaz12-Sep-02 4:22
Joao Vaz12-Sep-02 4:22 
GeneralCreating a wizard with winforms Pin
Noam Ben Haim10-Sep-02 4:31
Noam Ben Haim10-Sep-02 4:31 
GeneralRe: Creating a wizard with winforms Pin
Michael P Butler10-Sep-02 5:23
Michael P Butler10-Sep-02 5:23 
Generalfyi .. .Net's Webcontrols do not generate proper XHTML tags. Pin
Thesisus8-Sep-02 10:25
Thesisus8-Sep-02 10:25 
GeneralRe: fyi .. .Net's Webcontrols do not generate proper XHTML tags. Pin
Chris Maunder10-Sep-02 7:08
cofounderChris Maunder10-Sep-02 7:08 
GeneralRe: fyi .. .Net's Webcontrols do not generate proper XHTML tags. Pin
Paul Watson12-Sep-02 21:36
sitebuilderPaul Watson12-Sep-02 21:36 
General.NET and COM interop Pin
Jörgen Sigvardsson8-Sep-02 3:44
Jörgen Sigvardsson8-Sep-02 3:44 
GeneralRe: .NET and COM interop Pin
Stephane Rodriguez.8-Sep-02 11:01
Stephane Rodriguez.8-Sep-02 11:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.