Share via


ISdpNodeContainer::GetNodeStringData (Compact 2013)

3/26/2014

This method retrieves the contents of a string or URL node.

Syntax

HRESULT GetNodeStringData(
  ULONG nodeIndex,
  NodeData* pData
);

Parameters

  • nodeIndex
    [in] Zero-based index of the node within the container.
  • pData
    [in, out] On input or output, pointer to the NodeData structure containing the string.

Return Value

Returns S_OK on success; otherwise returns standard HRESULT values as appropriate.

Remarks

If NodeData::u.url.val is non-null, NodeData::u.url.length indicates the length of the supplied buffer. If the supplied buffer is shorter than the total length of the contents of the node, the length of the buffer is copied over and S_FALSE is returned.

If NodeData::u.url.val is NULL, ISdpNodeContainer allocates a buffer, copies the contents over, and assigns the buffer to NodeData::u.url.length. In this case, NodeData::u.url.length is set to the length of the buffer. The CoTaskMemFree function must be called to free the buffer allocated by ISdpNodeContainer.

See Also

Reference

ISdpNodeContainer
NodeData

Other Resources

CoTaskMemFree