English | 中文
WinUtils is a modern C++23 library of lightweight Windows utility components. All features support both narrow and wide character strings, and the library can be exported as a static library (.lib) or a dynamic library (.dll).
- Lightweight command-line parser with multiple parsing modes
- Encapsulation of common console functions
- Console menu supporting multi-level menus and command invocation
- HTTP networking library wrapping WinSock2, supporting GET and POST methods
- DLL injector
- Windows service management
- String conversion utilities
- Process / thread / window operations
- Comprehensive single-file logging library
- INI file parsing (based on the mINI library)
- Registry reading/writing (based on the WinReg library)
- Many more practical utilities...
- Visual Studio 2022 (MSVC compiler with C++23 standard support)
- Windows SDK
This library supports two usage methods:
- Static linking: Link
WinUtils.libinto your project; no additional DLL is required at runtime. - Dynamic linking: Use
WinUtils.dll; ensure the DLL is located in the same directory as the executable or in a system path.
- Open the project properties and select the configuration type: Static library (.lib) or Dynamic library (.dll).
- In C/C++ → General → Additional Include Directories, add the
includefolder located at the repository root. - In Linker → General → Additional Library Directories, add the directory containing the compiled
WinUtils.lib(orWinUtils.dll). - In Linker → Input → Additional Dependencies, add
WinUtils.lib(for static linking) orWinUtils.dll(for dynamic linking). - (Optional) Enable specific features using preprocessor macros:
Add the following macros in C/C++ → Preprocessor → Preprocessor Definitions, or#definethem before including the headers.
| Macro Name | Effect |
|---|---|
WU_DYNAMIC_LINK |
Use dynamic linking (requires the DLL). If not defined, static linking is used by default. |
WU_NARROW_STRING |
Use narrow character strings. Not recommended |
WU_NO_INI_CASE_SENSITIVE |
Makes the INI parser case‑insensitive (affects ini.h only). Default is case‑sensitive. |
- mINI: C++ INI parser (MIT License)
- WinReg: C++ registry read/write library (MIT License)
This project is licensed under the MIT License. See the LICENSE file for details.