tags:

views:

280

answers:

6

Is there anyway to monitor API calls on your system in C?

+1  A: 

Check this question which mentions some programs to monitor processes http://stackoverflow.com/questions/299261/hook-processes

Ismael
+1  A: 

Although it isn't free, you may want to look into API Monitor. It has the ability to log to XML files, so you could determine the APIs that have been called by reading this file in your application of choice.

John T
+2  A: 

Another tool to look at is ProcessMonitor from Mark Russinovich. It doesn't monitor all api calls, however.

RBerteig
And it uses a custom device driver.
aib
Right, it does that rather than inject a DLL into the process because it introduces fewer quirky issues and is less invasive of the process being inspected. It does mean that you need more than normal user privileges to run it, however.
RBerteig
+1  A: 

The Debugging Tools for Windows package includes a debugger extension called logexts.dll which can log Win32 API function calls. It also has a separate front-end program called logger.exe for when you don't want to attach the debugger.

bk1e
+1  A: 

On a function-by-function base, you can use Microsoft Detours. It intercepts API calls by rewriting the function entry points to point to your code.

MSalters
A: 

http://www.autodebug.com

The best api monitor tool (Auto Debug Profressional) can help you to do this. It can monitor all api calls.

susanwan