Manipulating Windows API calls