test function swap(), write binary file using win32 API.