다음을 통해 공유


IOleObject::GetMiscStatus

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method returns a value that indicates the status of an object at creation and loading.

Syntax

HRESULT GetMiscStatus( 
  DWORD dwAspect, 
  DWORD* pdwStatus
);

Parameters

  • dwAspect
    [in] Specifies the aspect of an object about which status information is being requested.

    The value is obtained from the enumeration DVASPECT.

  • pdwStatus
    [out] Pointer to where the status information is returned; cannot be NULL.

Return Value

One of the values in the following table is returned.

Value Description

S_OK

Status information returned successfully.

OLE_S_USEREG

Delegate the retrieval of miscellaneous status information to the default handler's implementation of this method.

CO_E_CLASSNOTREG

There is no CLSID registered for the object.

CO_E_READREGDB

Error accessing the registry.

Remarks

A container typically calls GetMiscStatus when it creates or loads an object in order to determine how to display the object and what types of behaviors it supports.

Objects store status information in the registry.

If the object is not running, the default handler's implementation of GetMiscStatus retrieves this information from the registry.

If the object is running, the default handler invokes GetMiscStatus on the object itself.

The default value of MiscStatus is used if a subkey corresponding to the specified DVASPECT is not found.

To set an OLE control, specify DVASPECT==1. This causes the following to occur in the registry:

HKEY_CLASSES_ROOT\CLSID\ . . .\MiscStatus = 1

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Notes to Implementers

Implementation normally consists of delegating the call to the default handler.

Requirements

Header Oleidl.h, oleidl.idl
Library oleaut32.lib, uuid.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IOleObject
DVASPECT

Concepts

Determining Supported COM APIs