I didn't find anything on the documentation if its safe to perform multithreaded calls to DismRemovePackage, DismRemoveCapability, DismDisableFeature, i mean, remove multiple "things" from the image at once.
Also, i tried to follow the DismGetPackages and DismGetFeatures examples from the documentation, but it doesn't compile and it also has a small typing error.
DismFeature* features;
and DismPackage* packages;
is returning just a single value instead of an array:
#include <Windows.h>
#include <dismapi.h>
int main(int argc, char *argv[])
{
DismLogLevel dwLogLevel = DismLogLevel::DismLogErrors;
HRESULT hr = DismInitialize(dwLogLevel, NULL, NULL);
DismSession session = NULL;
hr = DismOpenSession(L"V:\\", NULL, NULL, &session);
DismFeature* features;
UINT featuresCount = 0;
hr = DismGetFeatures(session, NULL, DismPackageIdentifier::DismPackageNone, &features, &featuresCount);
DismPackage* packages;
UINT packageCount = 0;
hr = DismGetPackages(session, &packages, &packageCount);
}