Share via


SetProperty (IXmlWriter) (Compact 2013)

3/26/2014

This method sets the specified property.

Syntax

HRESULT SetProperty (
    UINT nProperty, 
    LONG_PTR pValue
);

Arguments

  • nProperty
    [in] The enum that identifies the property to be set
  • pValue
    [in] The property value

Return Value

This method returns S_OK if no error is generated. If an invalid property name is passed, this method returns E_NOTIMPL.

Remarks

For information about the properties this method can set, see IXmlWriter Properties.

After writing starts, we do not recommend that you call this method.

The following code shows using SetProperty:

if (FAILED(hr = pWriter->SetProperty(XmlWriterProperty_Indent, TRUE)))
{
    wprintf(L"Error, Method: SetProperty XmlWriterProperty_Indent, error is %08.8lx", hr);
    return -1;
}

See Also

Reference

IXmlWriter Methods
IXmlWriter Properties