Question hooking API functions?

red

Member
Joined
Oct 16, 2013
Messages
15
Programming Experience
1-3
Hello,

I have quite some experience with C#, can make webforms, I recently built a web browser with C# and the rest. But I decided to step up to something higher.

I want to learn how to hook API with C#, I haven't seen examples on this before, source codes and the rest. Please I would be hapy to learn to have a basic understanding of what I am doing.
 
By "API" I assume that you mean the Windows API. Just look at anything about the DllImport attribute, which must be applied to any external method. You might also try pinvoke.net, which provides signatures for many Windows API functions.
 
Ok I want to hook wininet.dll with function InternetOpenA

I do something like [DLLImport("wininet.dll")] now am lost, how do I hook the function? Please I need a source code example.
 
I told you where to look and and they have an example there so you obviously haven't bothered to follow the advice that I've already provided.

Ok I read up something yesterday, hooking API using interops? I presume its a good example to begin with, another thing, can I use asm in C# programs? Kindly let me know.
 
can I use asm in C# programs? Kindly let me know.
That's nothing to do with the topic of this thread so it doesn't belong in this thread. In future, please keep each thread to a single topic and each topic to a single thread. To answer the question, no you can't.
 
Back
Top Bottom