Windows CE API hooking in C# or .NET CF

  • Thread starter Thread starter joemango
  • Start date Start date
J

joemango

Hi everyone, I was just reading the following artilce titled: "Spy: A
Windows CE API Interceptor" by Dmitri Leman in Dr. Dobbs Journal,
September 02, 2003 located at


http://www.ddj.com/184405459?pgno=1


the article presents source code that includes a dll file which holds
all the hooking procedures it is written in C++.


Is there an implementation for windows api hooking in C# or .NET out
there or how can it be done ?


Also how can I use the dll file in a C# program to make use of its
procedures ?


Thanks,


Jose.
 
Whose API calls are you trying to hook? Generally, you're going to need
exported functions in a DLL to accomplish this and managed code on Windows
CE won't do that. You could conceivably hook some routines using .NET CF
2.0, I think. The 'why' of all this is not clear to me, however. What are
you trying to accomplish?

As far as using DLLs, of course you can do that from managed code. P/Invoke
(Platform Invoke) the calls. This is done all over the place and thirty
seconds reading the old messages in this group will probably find you dozens
of example calls to unmanaged code. OpenNETCF SDF has probably hundreds of
examples in the source, www.opennetcf.org.

Paul T.
 
Back
Top