ITextRange::GetEmbeddedObject method (tom.h)

Retrieves a pointer to the embedded object at the start of the specified range, that is, at cpFirst. The range must either be an insertion point or it must select only the embedded object.

Syntax

HRESULT GetEmbeddedObject(
  IUnknown **ppObject
);

Parameters

ppObject

Type: IUnknown**

The pointer to the object.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If the method fails, it returns one of the following error codes. For more information about COM error codes, see Error Handling in COM.

Return code Description
E_INVALIDARG
ppObject is null.
S_FALSE
Failure for some other reason.

Remarks

If the start of this range does not have an embedded object or if the range selects more than a single object, ppObject is set equal to NULL.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header tom.h
DLL Msftedit.dll

See also

Conceptual

ITextRange

Reference

Text Object Model