On Monday, 3 February 2020 11:50:13 UTC+5:30,
anjali...@gmail.com wrote:
This Enable() class of UWF_Filter has no parameters and on calling ExecMethod with no *inParams always returns 0x8004102f(wbemErrInvalidMethodParameters) and similarly UWF_Volume.AddExcusion() with one input parameters also returns the same error.
How do I determine the objectPath? Can anyone help me with this!!!
found the solution:
IEnumWbemClassObject * enum_obj;
hres = pSvc->CreateInstanceEnum(_bstr_t( L"UWF_Filter"),WBEM_FLAG_RETURN_IMMEDIATELY , NULL ,&enum_obj);
IWbemClassObject * spInstance;
ULONG uNumOfInstances = 0;
hres = enum_obj->Next(10000, 1,&spInstance,&uNumOfInstances);
VARIANT path;
hres = spInstance->Get(_bstr_t("__Path"), 0,&path, 0, 0);
IWbemClassObject *results = NULL;
hres = pSvc->ExecMethod( path.bstrVal, _bstr_t( L"Enable" ), 0,
NULL,NULL,&results, NULL );
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)