WinStd
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
|
Provides additional templates and function helpers for Windows API using Standard C++ in Microsoft Visual C++ 2017-2019
This project does not require building. Just #include
individual files from this repository into your source code and get started.
...to simplify Windows allocated memory and resources focused on their release to prevent leakage
The classes provide unified create methods and free destructors. They are like smart-pointers for various Windows resources. Once created, you use the class instance as a snap-in replacement for pointers/handles parameters in the standard Win32 API functions.
...to extend standard Win32 API functions for variable-size outputs
Different Win32 API functions have different ways of returning variable-sized data. Getting tired of carefully studying MSDN for each particular Win32 API function how to preallocate the output memory correctly? We too...
WinStd provides a subset of Win32 API identically named functions (C++ polymorphism to the rescue), where one can use std::string
, std::wstring
, std::vector<>
etc. as an output parameter. WinStd handles all the dirty work with memory allocation for you, so you can focus on your code.
...for those situations where one must quckly compose a temporary string using sprintf()
or FormatMessage()
include
folder to Additional Include Directories in your project's C/C++ settings..h
files from WinStd as needed: An auto-generated documentation is here.
More examples and use-cases can be found in GÉANTLink and ZRCola projects source code. They make heavy use of WinStd.