changed C source for winapi