From 3b110f7dc5cda4e5a4d70a06408f4ac5945b3695 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Mon, 7 Mar 2022 13:00:17 +0100 Subject: [PATCH] Update documentation Signed-off-by: Simon Rozman --- Doxyfile | 2 +- README.md | 18 ++++++++++-------- include/WinStd/COM.h | 8 +------- include/WinStd/Common.h | 8 -------- include/WinStd/Cred.h | 4 ---- include/WinStd/Crypt.h | 4 ---- include/WinStd/EAP.h | 4 ---- include/WinStd/ETW.h | 4 ---- include/WinStd/GDI.h | 4 ---- include/WinStd/MSI.h | 4 ---- include/WinStd/Sec.h | 4 ---- include/WinStd/SetupAPI.h | 4 ---- include/WinStd/Shell.h | 4 ---- include/WinStd/WLAN.h | 4 ---- include/WinStd/Win.h | 4 ---- include/WinStd/WinSock2.h | 4 ---- include/WinStd/WinTrust.h | 4 ---- 17 files changed, 12 insertions(+), 76 deletions(-) diff --git a/Doxyfile b/Doxyfile index d3329fe8..01b40e55 100644 --- a/Doxyfile +++ b/Doxyfile @@ -44,7 +44,7 @@ PROJECT_NUMBER = # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = "Additional templates and function helpers for Microsoft Windows using Standard C++ classes" +PROJECT_BRIEF = "Windows Win32 API using Standard C++" # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 diff --git a/README.md b/README.md index 84a257b2..12932548 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # WinStd -Provides additional templates and function helpers for Windows API using Standard C++ in Microsoft Visual C++ 2017-2019 +Provides templates and function helpers for Windows Win32 API using Standard C++ in Microsoft Visual C++ 2017-2019 ## Features @@ -8,11 +8,9 @@ Provides additional templates and function helpers for Windows API using Standar This project does not require building. Just `#include` individual files from this repository into your source code and get started. -### Lightweight Classes +### Memory and Resource Helper Classes -...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. +Simplify memory and resource management. The classes release memory and resources automatically. 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 function calls. #### Example @@ -26,8 +24,6 @@ m_note_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(48))); ### Functions and Templates -...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. @@ -43,7 +39,7 @@ std::cout << response.c_str() << std::endl; ### String Formatters -...for those situations where one must quckly compose a temporary string using `sprintf()` or `FormatMessage()` +For those situations where one must quckly compose a temporary string using `sprintf()` or `FormatMessage()`. Or, convert a GUID to a string on the fly. #### Example @@ -56,6 +52,10 @@ if (dwMaxSendPacketSize < sizeof(EapPacket)) dwMaxSendPacketSize)); ``` +## What WinStd Is Not + +WinStd is not trying to be a full-fledged object-oriented framework on top of Win32 API. We have Microsoft to publish those once every few years - and obsolete it when they loose interest. WinStd aims at augmenting Win32 API with a little bit of help from C++. + ## Usage 1. Clone the repository into your solution folder. @@ -79,3 +79,5 @@ void main() An auto-generated documentation is [here](https://amebis.github.io/WinStd/). More examples and use-cases can be found in [GÉANTLink](https://github.com/Amebis/GEANTLink) and [ZRCola](https://github.com/Amebis/ZRCola) projects source code. They make heavy use of WinStd. + +This is a one-man project for the time being, so the Win32 API support is far from complete. It is added as needed. Contributions are welcome. diff --git a/include/WinStd/COM.h b/include/WinStd/COM.h index b9d5160c..33bc5f50 100644 --- a/include/WinStd/COM.h +++ b/include/WinStd/COM.h @@ -4,13 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Provides helper templates for Windows COM object manipulation -/// -/// \defgroup WinStdCOM COM object management -/// -/// Provides helper templates for Windows COM object manipulation -/// +/// \defgroup WinStdCOM COM Object Management #pragma once diff --git a/include/WinStd/Common.h b/include/WinStd/Common.h index e9111afb..95cf1e14 100644 --- a/include/WinStd/Common.h +++ b/include/WinStd/Common.h @@ -16,14 +16,9 @@ #include #include -/// \file -/// General API -/// /// \defgroup WinStdGeneral General -/// General API /// /// \defgroup WinStdStrFormat String Formatting -/// Formatted string generation /// /// \par Example /// \code @@ -33,13 +28,10 @@ /// \endcode /// /// \defgroup WinStdSysHandles System Handles -/// Simplifies work with object handles of various type /// /// \defgroup WinStdExceptions Exceptions -/// Additional exceptions /// /// \defgroup WinStdMemSanitize Auto-sanitize Memory Management -/// Sanitizes memory before dismissed /// \addtogroup WinStdGeneral /// @{ diff --git a/include/WinStd/Cred.h b/include/WinStd/Cred.h index 5756bb33..6b10f23b 100644 --- a/include/WinStd/Cred.h +++ b/include/WinStd/Cred.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft Credentials API -/// /// \defgroup WinStdCredAPI Credentials API -/// Integrates WinStd classes with Microsoft Credentials API #pragma once diff --git a/include/WinStd/Crypt.h b/include/WinStd/Crypt.h index 2564f354..fe7576c8 100644 --- a/include/WinStd/Crypt.h +++ b/include/WinStd/Crypt.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft Cryptography API -/// /// \defgroup WinStdCryptoAPI Cryptography API -/// Integrates WinStd classes with Microsoft Cryptography API #pragma once diff --git a/include/WinStd/EAP.h b/include/WinStd/EAP.h index be7c5cd3..ebd9b1c2 100644 --- a/include/WinStd/EAP.h +++ b/include/WinStd/EAP.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft EAP API -/// /// \defgroup WinStdEAPAPI Extensible Authentication Protocol API -/// Integrates WinStd classes with Microsoft EAP API #pragma once diff --git a/include/WinStd/ETW.h b/include/WinStd/ETW.h index a21c931e..c3624460 100644 --- a/include/WinStd/ETW.h +++ b/include/WinStd/ETW.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Event Tracing for Windows API -/// /// \defgroup WinStdETWAPI Event Tracing for Windows API -/// Integrates WinStd classes with Event Tracing for Windows API #pragma once diff --git a/include/WinStd/GDI.h b/include/WinStd/GDI.h index d836037b..4acc3881 100644 --- a/include/WinStd/GDI.h +++ b/include/WinStd/GDI.h @@ -3,11 +3,7 @@ Copyright © 1991-2022 Amebis */ -/// \file -/// Integrates WinStd classes with Microsoft Windows GDI -/// /// \defgroup WinStdGdiAPI GDI API -/// Integrates WinStd classes with Microsoft Windows GDI #pragma once diff --git a/include/WinStd/MSI.h b/include/WinStd/MSI.h index 47692dc5..9e7aa053 100644 --- a/include/WinStd/MSI.h +++ b/include/WinStd/MSI.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft Installer API -/// /// \defgroup WinStdMSIAPI Microsoft Installer API -/// Integrates WinStd classes with Microsoft Installer API #pragma once diff --git a/include/WinStd/Sec.h b/include/WinStd/Sec.h index 0b02e643..66af6de3 100644 --- a/include/WinStd/Sec.h +++ b/include/WinStd/Sec.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft Security API -/// /// \defgroup WinStdSecurityAPI Security API -/// Integrates WinStd classes with Microsoft Security API #pragma once diff --git a/include/WinStd/SetupAPI.h b/include/WinStd/SetupAPI.h index bcb681a7..12dca7db 100644 --- a/include/WinStd/SetupAPI.h +++ b/include/WinStd/SetupAPI.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft Setup API -/// /// \defgroup SetupAPI Setup API -/// Integrates WinStd classes with Microsoft Setup API #pragma once diff --git a/include/WinStd/Shell.h b/include/WinStd/Shell.h index e3c72688..61d9f223 100644 --- a/include/WinStd/Shell.h +++ b/include/WinStd/Shell.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft Shell API -/// /// \defgroup WinStdShellWAPI Shell API -/// Integrates WinStd classes with Microsoft Shell API #pragma once diff --git a/include/WinStd/WLAN.h b/include/WinStd/WLAN.h index 0eb70c3f..ff7c1495 100644 --- a/include/WinStd/WLAN.h +++ b/include/WinStd/WLAN.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft WLAN API -/// /// \defgroup WinStdWLANAPI WLAN API -/// Integrates WinStd classes with Microsoft WLAN API #pragma once diff --git a/include/WinStd/Win.h b/include/WinStd/Win.h index 8142671a..24772117 100644 --- a/include/WinStd/Win.h +++ b/include/WinStd/Win.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft Windows API -/// /// \defgroup WinStdWinAPI Windows API -/// Integrates WinStd classes with Microsoft Windows API #pragma once diff --git a/include/WinStd/WinSock2.h b/include/WinStd/WinSock2.h index 2b77515c..2c07ba01 100644 --- a/include/WinStd/WinSock2.h +++ b/include/WinStd/WinSock2.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft WinSock2 API -/// /// \defgroup WinSock2API WinSock2 API -/// Integrates WinStd classes with Microsoft WinSock2 API #pragma once diff --git a/include/WinStd/WinTrust.h b/include/WinStd/WinTrust.h index 19e641ac..0ec5de90 100644 --- a/include/WinStd/WinTrust.h +++ b/include/WinStd/WinTrust.h @@ -4,11 +4,7 @@ Copyright © 2016 GÉANT */ -/// \file -/// Integrates WinStd classes with Microsoft WinTrust API -/// /// \defgroup WinTrustAPI WinTrust API -/// Integrates WinStd classes with Microsoft WinTrust API #pragma once