IWDTFTarget2::Context property

Gets and sets a name-value pair that represents user data for the target.

This property is read/write.

Syntax


HRESULT put_Context(
  [in]           BSTR Tag,
  [in]           VARIANT newVal
);

HRESULT get_Context(
  [in]           BSTR Tag,
  [out, retval]  VARIANT *pVal
);

Property value

The user data as a name-value pair.

Remarks

The Context property is parameterized with the BSTR Tag parameter. This parameterization enables you to attach many different named values to an instance of the IWDTFTarget2 interface. You can then retrieve these same values by name at a later time.

Each value is stored as a VARIANT, which correctly follows COM ref-counting rules. You can store object references within the target as easily as any other variable data-type.

For more information about the Context property, see Creating WDTF Scenarios.

Requirements

Minimum supported client

Windows XP Professional

Minimum supported server

Windows Server 2008

Namespace

Microsoft.WDTF

Assembly

WDTF.Interop.metadata_dll

Header

WDTF.h

IDL

WDTF.idl

See also

IWDTFTarget2

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft