Click here to Skip to main content
15,884,986 members
Articles / Desktop Programming / Win32

CLR Injection: Runtime Method Replacer

Rate me:
Please Sign up or sign in to vote.
4.99/5 (44 votes)
23 Jun 2009CPOL8 min read 257.2K   4.9K   156  
Replace any method with another method at runtime. Updated for 3.5 SP1.

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JitLogger", "JitLogger\JitLogger.vcproj", "{ED2B162D-946E-47CC-90CB-131050083F60}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NativeAssemblerInjection", "NativeAssemblerInjection\NativeAssemblerInjection.csproj", "{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReplaceExample", "ReplaceExample\ReplaceExample.csproj", "{5152FA04-51F1-4790-8904-849C759A063A}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Debug|Mixed Platforms = Debug|Mixed Platforms
		Debug|Win32 = Debug|Win32
		Debug|x86 = Debug|x86
		Release|Any CPU = Release|Any CPU
		Release|Mixed Platforms = Release|Mixed Platforms
		Release|Win32 = Release|Win32
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{ED2B162D-946E-47CC-90CB-131050083F60}.Debug|Any CPU.ActiveCfg = Debug|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Debug|Mixed Platforms.Build.0 = Debug|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Debug|Win32.ActiveCfg = Debug|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Debug|Win32.Build.0 = Debug|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Debug|x86.ActiveCfg = Debug|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Debug|x86.Build.0 = Debug|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Release|Any CPU.ActiveCfg = Release|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Release|Any CPU.Build.0 = Release|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Release|Mixed Platforms.ActiveCfg = Release|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Release|Mixed Platforms.Build.0 = Release|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Release|Win32.ActiveCfg = Release|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Release|Win32.Build.0 = Release|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Release|x86.ActiveCfg = Release|Win32
		{ED2B162D-946E-47CC-90CB-131050083F60}.Release|x86.Build.0 = Release|Win32
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Debug|Win32.ActiveCfg = Debug|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Debug|x86.ActiveCfg = Debug|x86
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Debug|x86.Build.0 = Debug|x86
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Release|Any CPU.Build.0 = Release|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Release|Win32.ActiveCfg = Release|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Release|Win32.Build.0 = Release|Any CPU
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Release|x86.ActiveCfg = Release|x86
		{C8CCB05A-A80A-4531-86F1-3A50907F7DEC}.Release|x86.Build.0 = Release|x86
		{5152FA04-51F1-4790-8904-849C759A063A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Debug|Win32.ActiveCfg = Debug|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Debug|x86.ActiveCfg = Debug|x86
		{5152FA04-51F1-4790-8904-849C759A063A}.Debug|x86.Build.0 = Debug|x86
		{5152FA04-51F1-4790-8904-849C759A063A}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Release|Any CPU.Build.0 = Release|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Release|Win32.ActiveCfg = Release|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Release|Win32.Build.0 = Release|Any CPU
		{5152FA04-51F1-4790-8904-849C759A063A}.Release|x86.ActiveCfg = Release|x86
		{5152FA04-51F1-4790-8904-849C759A063A}.Release|x86.Build.0 = Release|x86
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions