how to intercepting operating system function call [closed]
suppose if a program make a operating system function call and I have to intercept it how it can be done?
API hooking in C# directly isn't possible, manipulating the stack frame requires machine code. There is however a pretty popular library available that makes it possible from a C# program, EasyHook, download is here. Source code is available, in case you want to find out how it works.
You need to create a hook. In unmanaged code you should be able to use Detours. Check out EasyHook since you need to do this in C#. This article on The Code Project explains how to use it.
精彩评论