title: How to catch file creation and the responsible caller
body: <p>We are using a third part library to render 3d. In this library there is a "memory tracker" functionality that keeps track of all memory the library has allocated and freed during execution. This is a nice feature, since it helps by determining e.g. memory leaks.</p>
  
  <p>By calling a certain function in this library a log file is generated in the current working directory of the process. Lately I've noticed that this file shows up in several different places, so my first thought was of course to always set the current working directory to the folder I want the log to show up in, and this works fine.</p>
  
  <p>However, it turns out that this file is still created in various places without above mentioned function ever being called by the program. Hence, the file must somehow be created by the library without my consent. The creator of this library says that the engine never calls this method internally.</p>
  
  <p>So, in order to prove him wrong (alternatively proving myself to be stupid (won't be the first time though)), I need a way to catch exactly when this file is created. <strong>FindFirstChangeNotification()</strong> will not do, since this will only provide me with information that something happened in some folder. Ideally I'd like to (either in process or out of process) intercept when this happens and somehow inject a process exception (e.g. make WinDbg catch this), so I through the callstack get the information I want.</p>
  
  <p>Any suggestions are welcome.</p>
  
  <p>Cheers!</p>