EN
Данное содержимое не доступно на вашем языке, используйте версию на английском языке.

PSPropertyBag_ReadType function

Reads the type of data value of a property that is stored in a property bag.

Syntax


HRESULT PSPropertyBag_ReadType(
  _In_   IPropertyBag *propBag,
  _In_   LPCWSTR propName,
  _Out_  VARIANT *var,
  _Out_  VARTYPE *type
);

Parameters

propBag [in]

Type: IPropertyBag*

A pointer to an IPropertyBag object, that represents the property bag in which the property is stored.

propName [in]

Type: LPCWSTR

A pointer to a null-terminated property name string.

var [out]

Type: VARIANT*

Returns on successful function completion a pointer to a VARIANT data type that contains the property value.

type [out]

Type: VARTYPE*

If type is VT_EMPTY, this function reads the VARIANT of the property in the IPropertyBag propBag parameter. If type is not VT_EMPTY and not the same as the VARIANT read, then this function attempts to convert the VARIANT read to the VARTYPE defined by type parameter before returning.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

IPropertyBag and IPersistPropertyBag optimize Save As Text functionality. IPropertyBag and IPropertyBag2 provide an object with a property bag in which the object can save its properties persistently. IPropertyBag2 allows the object to obtain type information for each property: IPropertyBag2::Read causes one or more properties to be read from the property bag, and IPropertyBag2::Write causes one or more properties to be saved into the property bag.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Propsys.h

Library

Propsys.lib

DLL

Propsys.dll (version 6.0 or later)

See also

PSPropertyBag_Delete

 

 

Добавления сообщества

ДОБАВИТЬ
Показ:
© 2014 Microsoft