IPropertyContainer::SetPropSz method

[IPropertyContainer::SetPropSz is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Sets the property value for a specified property ID.

Syntax

HRESULT SetPropSz(
  [in] DWORD dwPropTag,
  [in] LPSTR psz
);

Parameters

dwPropTag [in]

Type: DWORD

Specifies a DWORD that contains the property ID.

psz [in]

Type: LPSTR

Specifies a reference pointer to a string that contains the property value.

Return value

Type: HRESULT

Returns one of the following values.

Return code Description
S_OK
Indicates success.
E_BadPropType
Indicates that dwPropTag specifies an invalid property type.
E_InvalidBooleanValue
Indicates that an invalid boolean value was passed in. The value must be one or zero.
E_InvalidMinMaxValue
Indicates that the value of psz is out of bounds.
E_PropNotFound
Indicates that dwPropTag specifies an invalid property ID.
E_InvalidPropTag
Indicates that dwPropTag specifies an invalid property ID or that it specifies an unsupported data type.

Remarks

The value of psz can be NULL only for string and binary data types.

The IPropertyContainer::SetPropDw and IPropertyContainer::SetPropSz methods are simple helper functions that internally call the base IPropertyContainer::SetProp method to make setting properties easier when dealing with the most common data types (4 byte numbers and null-terminated strings).

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Product
Outlook Express 6.0
Header
Imnact.h
IDL
Imnact.idl
DLL
Msoeacct.dll (version 6.0 or later)