deleteClass method

void deleteClass(
  1. BSTR strClass,
  2. WBEM_GENERIC_FLAG_TYPE lFlags,
  3. IWbemContext? pCtx,
  4. Pointer<VTablePointer>? ppCallResult,
)

Deletes the specified class from the current namespace.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/wbemcli/nf-wbemcli-iwbemservices-deleteclass.

Implementation

@pragma('vm:prefer-inline')
void deleteClass(
  BSTR strClass,
  WBEM_GENERIC_FLAG_TYPE lFlags,
  IWbemContext? pCtx,
  Pointer<VTablePointer>? ppCallResult,
) {
  final hr$ = HRESULT(
    _DeleteClassFn(
      ptr,
      strClass,
      lFlags,
      pCtx?.ptr ?? nullptr,
      ppCallResult ?? nullptr,
    ),
  );
  if (hr$.isError) throw WindowsException(hr$);
}