IWSManResourceLocator::AddSelector method

Adds a selector to the ResourceLocator object. The selector specifies a particular instance of a resource. You can provide an IWSManResourceLocator object instead of specifying a resource URI in IWSManSession object operations such as Get, Put, or Enumerate.

Syntax


HRESULT AddSelector(
  [in] BSTR    resourceSelName,
  [in] VARIANT selValue
);

Parameters

resourceSelName [in]

The selector name. For example, when requesting WMI data, this parameter is the key property for a WMI class.

selValue [in]

The selector value. For example, for WMI data, this parameter contains a value for a key property that identifies a specific instance.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

WSManDisp.h

IDL

WSManDisp.idl

Library

WSManDisp.tlb

DLL

WSMAuto.dll

See also

IWSManResourceLocator
ResourceLocator.AddSelector

 

 

Show: