KNSoft.CBS is a small C library for managing online Windows optional features through the native Component-Based Servicing (CBS) COM interfaces. It does not use DISM or WMI.
The library opens the system CBS local server, works with the @Foundation package, and exposes only the operations
needed by KNSoft.ZPigeon:
- enumerate root Windows features and their current, intended, and requested states;
- enable a feature, optionally enabling its parent dependencies;
- disable a feature;
- commit changes and report whether a reboot is required.
CBS is an undocumented Windows interface. The ABI used here has been verified against current Windows 11 servicing binaries and the interface lineage present on Windows 10 and later.
Use Visual Studio 2026/MSBuild 18 to build Source\KNSoft.CBS.slnx.
Include KNSoft/CBS/CBS.h and link KNSoft.CBS.lib. NuGet consumers get the include path and
architecture-specific library through KNSoft.CBS.targets; the static library carries its system link dependency.
Feature strings remain valid only for the duration of the enumeration callback. Returning FALSE stops enumeration.