Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3401870
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:04:07+00:00 2026-05-18T05:04:07+00:00

In most common sense of course it is a method to influence the behavior

  • 0

In most common sense of course “it is a method to influence the behavior of a program in a way its authors did not intend” (wiki).

Then all reflection and typebuilder using techniques also can be named with “code injection” but nobody do this.

When I was always thinking that “code injection” is something about “runtime”: like starting thread in another process to get some interesting data, I have surprised how Reflexil understands this: “convert C# instructions into IL on ‘desing time’, save edited assembly and replace old assembly with new” (10% that I miss something).

So now I’m interesting what techniques in the .NET are named with “code injection” term?

BTW. I’m interesting to know: is it possible to replace a “pointer to the virtual method” in the “virtual method table” of very-very private, several times nested, system class, with pointer to my own method at run time. Pure code injection from my understanding.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:04:08+00:00Added an answer on May 18, 2026 at 5:04 am

    Code injection in .NET is quite difficult. Mostly because code doesn’t exist until the last possible moment. A fraction of a second before it starts executing, generated by the JIT compiler.

    Practical approaches uses IL rewriting, common in AOP for example. This happens off-line, before the program even starts to execute. This isn’t really ‘injection’ anymore, you physically change the program on disk.

    There is an inline IL rewriting technique, it uses the unmanaged profiler interfaces. Pretty impractical, a magazine article that documents the approach is available here. It is quite dated, the profiler API has changed quite a bit since then. Never heard of a tool that uses this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What's the most common/best way to setup a WCF service project and applications? Here's
Whats the most common way of instantiating VB6 ActiveX controls inside of an Tcl/Tk
It is widely known common sense, that for most algorithms, allocating and deallocating data
What is the most common way to handle an exception, after it was thrown.
The most common way to consume SOAP based services on Android seems to be
One of the most common operation with source code is to modify the method
The most common method for corrupting compressed files is to inadvertently do an ASCII-mode
Most common ORMs implement persistence by reachability, either as the default object graph change
The most common source of free historical information is Wikipedia, but I am missing
On most common platforms (the most important being x86; I understand that some platforms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.