HRESULT getData( BSTR format, VARIANT *pvarRet );
- [in] A BSTR that specifies one of the following data format values.
- Gets data formatted as text.
- Gets data formatted as a URL.
- [out, retval] A pointer to a VARIANT of type VT_BSTR. Returns the data in the format retrieved from the clipboard through the dataTransfer object or the clipboardData object. Depending on the information contained in IHTMLDataTransfer::setData, this variable can get a path to an image, text, or an anchor URL.
Returns S_OK if successful, or an error value otherwise.
The IHTMLDataTransfer::getData method enforces cross-frame security and allows data transfers only in the same domain. To the user, this means that a selection that is dragged between different security protocols, such as HTTP and HTTPS, fails. In addition, that a selection that is dragged between two instances of the application with different security levels, where the first instance is set to medium and the second is set to high, fails. Finally, that a selection that is dragged into the application from another drag-enabled application, such as Microsoft Word, also fails.