IOleUIObjInfoA::GetViewInfo method (oledlg.h)

Gets the view information associated with the object.

Syntax

HRESULT GetViewInfo(
  [in]           DWORD   dwObject,
  [in, optional] HGLOBAL *phMetaPict,
  [in, optional] DWORD   *pdvAspect,
  [in, optional] int     *pnCurrentScale
);

Parameters

[in] dwObject

Unique identifier for the object.

[in, optional] phMetaPict

Pointer to the object's current icon. This parameter can be NULL, indicating that the caller is not interested in the object's current presentation.

[in, optional] pdvAspect

Pointer to the object's current aspect. This parameter can be NULL, indicating that the caller is not interested in the object's current aspect, for example, DVASPECT_ICONIC or DVASPECT_CONTENT.

[in, optional] pnCurrentScale

Pointer to the object's current scale. This parameter can be NULL, indicating that the caller is not interested in the current scaling factor applied to the object in the container's view.

Return value

This method returns S_OK on success. Other possible return values include the following.

Return code Description
E_ACCESSDENIED
Insufficient access permissions.
E_FAIL
The operation failed.
E_INVALIDARG
The specified identifier is not valid.
E_OUTOFMEMORY
There is insufficient memory available for this operation.

Remarks

Notes to Implementers

You must fill in the object's current icon, aspect, and scale.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header oledlg.h

See also

IOleUIObjInfo

OLEUIVIEWPROPS