Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » C#   (RSS)

MSIL Injection: Rewrite a non dynamic method at runtime

The .Net Framework contains classes to create dynamic methods at runtime but what about rewriting existing methods at runtime? Is it even possible? It turns out yes, but with some stringent constraints. We are going to create a sample program where we
Posted by ZiadElmalki | 3 Comments
Filed under: , , , , , ,

Attachment(s): TestRuntimeMethodReplace.zip

New Open source Console Emulator in C#

Been a while seen I had a change to get on here. I have been really busy at work. I will try to start posting more. I started a new open source project today on codeplex. A couple years ago I wrote a semi working nintendo emulator in C#. I got it to the

Cuda and Stream Programming - The next big thing?

Today while researching which type of video card to buy I kept seeing the word CUDA in the specs but I did not know what it meant. Nvidia in the last year or so bought a company called PhysX. PhysX created a physics runtime and a special add in card that
Posted by ZiadElmalki | 4 Comments
Filed under: , , ,

Creating a WCF IDispatchMessageInspector

Sorry I have not had a chance to post in a while. I had a really bad flu and then there was a snow storm where I live. Everything thing is cleared up now and I will be going to work tomorrow. I am still a little new to wcf. Today I was presented with
Posted by ZiadElmalki | 1 Comments
Filed under: , ,

Attachment(s): TestRequestInterceptor.cs

Create dynamic WCF Clients without any configuration/service references

The other day I wanted to do some simple perf tests against a bunch of different wcf services that I am working on. I wrote a little test tool to do this but I had some problems with my test tool. My test application was very tightly coupled to the services.
Posted by ZiadElmalki | 5 Comments
Attachment(s): ClientFactory.cs

Performance when creating objects using generic new constraint

I got an email asking about the performance when creating objects using the generic new constraint. You can learn more about the generic new constraint here http://msdn.microsoft.com/en-us/library/sd2w2ew5.aspx and here http://msdn.microsoft.com/en-us/library/d5x73970.aspx
Posted by ZiadElmalki | 0 Comments
Attachment(s): Program.cs

Reflection : Fast Object Creation

Reflection is a powerful api in the .net framework. Reflection allow us to inspect types at runtime, dynamically invoke methods, create objects, etc. Using reflection developers can make highly modular applications where functionality can be replaced
Posted by ZiadElmalki | 1 Comments
Attachment(s): Program.cs

Why are these nop instructions in my debug build?

If you run the sample code from the last post in release mode and debug mode you will notice that the msil for the test method are different. Method Program.TestMethod -- DEBUG ------------------------------- 0x0000 nop 0x0001 ldc.i4.0 0x0002 stloc.0
Posted by ZiadElmalki | 0 Comments
Filed under: , , , ,

Msil Parser Quick Update

Here is a quick update. The code will now resolve any tokens in the msil so now you can see the methods, strings, types, etc. I added a new method called GetData that takes a module, opcode, and the raw data byte array. As you can see they are very few
Posted by ZiadElmalki | 0 Comments
Filed under: , , , ,

Msil Parser

I just moved into a new apartment last Saturday and have had no internet access till today. Life without internet is like being cut off from the world. I can't check my email, I can't work from home, I got to call and talk to people to order food ;{ It
Posted by ZiadElmalki | 1 Comments
Filed under: , , , ,
 
Page view tracker