Reputation: 73
I didn't find anything on the documentation if its safe to perform multithreaded calls to DismRemovePackage, DismRemoveCapability, DismDisableFeature, i mean, attempt to remove multiple "things" from the image at once.
#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);
hr = DismRemoveCapability(session, L"Print.Fax.Scan~~~~0.0.1.0", NULL, DismProgressCallback, NULL);
// ...
return 0;
}
Upvotes: 1
Views: 80