SetValueFromString

Applies to: SharePoint Foundation 2010

Sets the value of a document property from the specified string.

HRESULT SetValueFromString(
   LPCSTR val,
   int pvtHint
);

Parameters

val

[in] The value to set the document property to.

pvtHint

[in] The document property's data type.

Possible values are:

pvtNull

The value type is empty or null.

pvtNumber

The property's data type is Integer.

pvtDouble

The property's data type is Double.

pvtDateTime

The property's data type is DateTime.

pvtBoolean

The property's data type is Boolean.

pvtShortText

The property's data type is String, and is less than 256 characters in length.

pvtLongText

The property's data type is String, and is greater than or equal to 256 characters in length.

cpvtMax

The property is the maximum length of a text string.

Return Value

The IParserProperty Interface methods return typical HRESULT values. In general, the method should return a positive OK value when successful or a negative FAIL value when unsuccessful.

Remarks

If Microsoft SharePoint Foundation cannot determine the data type, it assigns to the property the data type that is specified in the pvtHint parameter. If the data type that is specified in the pvtHint parameter does not match the value specified, the method returns an error.

See Also

Reference

IParserProperty Interface

Concepts

Custom Document Parsers

Document Parser Interface Overview