execMethodAsync method
void
execMethodAsync(
- BSTR strObjectPath,
- BSTR strMethodName,
- WBEM_GENERIC_FLAG_TYPE lFlags,
- IWbemContext? pCtx,
- IWbemClassObject? pInParams,
- IWbemObjectSink? pResponseHandler,
Asynchronously executes a method exported by a CIM object.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/wbemcli/nf-wbemcli-iwbemservices-execmethodasync.
Implementation
@pragma('vm:prefer-inline')
void execMethodAsync(
BSTR strObjectPath,
BSTR strMethodName,
WBEM_GENERIC_FLAG_TYPE lFlags,
IWbemContext? pCtx,
IWbemClassObject? pInParams,
IWbemObjectSink? pResponseHandler,
) {
final hr$ = HRESULT(
_ExecMethodAsyncFn(
ptr,
strObjectPath,
strMethodName,
lFlags,
pCtx?.ptr ?? nullptr,
pInParams?.ptr ?? nullptr,
pResponseHandler?.ptr ?? nullptr,
),
);
if (hr$.isError) throw WindowsException(hr$);
}