Export (0) Print
Expand All

IPerPropertyBrowsing::GetPredefinedValue method

Retrieves the value of the specified property that is associated with a predefined string name. This property is associated with a predefined string name as returned from IPerPropertyBrowsing::GetPredefinedStrings. The predefined string is identified by a token returned from GetPredefinedStrings.

Syntax


HRESULT GetPredefinedValue(
  [in]  DISPID  dispID,
  [in]  DWORD   dwCookie,
  [out] VARIANT *pVarOut
);

Parameters

dispID [in]

The dispatch identifier of the property for which a predefined value is requested.

dwCookie [in]

A token identifying which value to return. The token was previously returned in the pCaCookiesOut array filled by GetPredefinedStrings.

pVarOut [out]

A pointer to the VARIANT value for the property.

Return value

This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following values.

Return codeDescription
S_OK

The method completed succesfully.

E_NOTIMPL

This object does not support predefined strings or predefined values.

E_POINTER

The address in pVarOut is not valid. For example, it may be NULL.

 

Remarks

Notes to Callers

The caller is responsible for freeing any allocations contained in the VARIANT. Unless the vt member of VARIANT is VT_VARIANT, the caller can free memory using a single call to VariantClear. Otherwise, the caller must recursively free the contained VARIANT values before freeing the outer VARIANT.

Notes to Implementers

Support for predefined names and values is not required. If your object does not support these names, return E_NOTIMPL from this method. If this method is not implemented, IPerPropertyBrowsing::GetPredefinedStrings must not be implemented either.

This method allocates any memory needed inside the VARIANT.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IPerPropertyBrowsing is defined as 376BD3AA-3845-101B-84ED-08002B2EC713

See also

IPerPropertyBrowsing

 

 

Community Additions

ADD
Show:
© 2015 Microsoft