C++17 In Detail

27 March 2017

Windows File Tests

See my new website at cppstories.com

Transform a file on Windows

You want to transform one file into another, input into output. What API will you choose on Windows? WinApi? C++ Streams or good old stdio?

Last year in September I looked at four ways of processing a file on Windows. Also, I did some performance tests.
The whole project description was recently published in Visual Studio Magazine.

The idea was relatively straightforward: I’d like to transform data from one file and write that into another file. The transformation method wasn’t important (it could be just a copy or encryption). I was interested how can you achieve that using Apis: C++ streams, C stdio, WinApi basic and WinApi memory mapped files.

After I had built the whole processing code, I was able to test the performance. What API was the fastest? How do you think? What was the easiest to use?

The articles:

And there’s also GitHub repo with all sources: fenbf/WinFileTests

In the future it might be worth to try using multiple threads and see what are the benefits.

Please have a look at the articles and let me know what you think.

If you want to get additional C++ resources, exlusive articles, early access content, private Discord server and weekly curated news, check out my Patreon website: (see all benefits):

© 2017, Bartlomiej Filipek, Blogger platform
Disclaimer: Any opinions expressed herein are in no way representative of those of my employers. All data and information provided on this site is for informational purposes only. I try to write complete and accurate articles, but the web-site will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use.
This site contains ads or referral links, which provide me with a commission. Thank you for your understanding.