Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

UWF_Filter.Enable()

50 views
Skip to first unread message

anjali...@gmail.com

unread,
Feb 3, 2020, 1:20:13 AM2/3/20
to
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!!!

anjali...@gmail.com

unread,
Feb 3, 2020, 5:11:17 AM2/3/20
to
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 );


0 new messages