SPropValue 

The SPropValue structure describes a MAPI property.

Quick Info

Header file:

MAPIDEFS.H

Related macros:

CHANGE_PROP_TYPE56IB.U3
MVI_PROPLUD1JU
PROP_ID6WG9M0
PROP_TAGRIO1.8
PROP_TYPE4N9Q_E5

 

typedef struct _SPropValue

     ULONG     ulPropTag;

     ULONG     dwAlignPad;

     union _PV  Value;

} SPropValue, FAR *LPSPropValue;

 

Members

ulPropTag

Property tag for the property. Property tags are 32-bit unsigned integers consisting of the property s unique identifier in the high order 16 bits and the property s type in the low order 16 bits.

dwAlignPad

Reserved for MAPI; do not use.

Value

Union of data values, the specific value dictated by the type of property. Property types are stored in the ulPropTag member.

 

Remarks

The ulPropTag member is made up of two parts: an identifier and a type. The identifier is a numeric value that is assigned to a particular range. MAPI defines ranges for identifiers to describe the purpose of the property and who is responsible for maintaining it. The type is a value that indicates the format for the property s value. MAPI defines constants for each of the property types that it supports in the MAPIDEFS.H header file and each of the property tags it supports in the MAPITAGS.H header file.

For a complete list of the valid property ranges for identifiers and property types, see the Property Identifiers and Types18OKWU2 appendix.

The dwAlignPad member is designed for computers that require 8-byte alignment for 8-byte values. This member makes it possible for clients and service providers to allocate an array of property values on an 8-byte boundary and have the array aligned correctly. Developers who write code on such computers should use memory allocation routines that allocate the SPropValue arrays on 8-byte boundaries. The property type designates which member of the union should be used. The Value member contains one of the members of the _UPV union, defined as follows:

typedef union _PV

     short int             i;

     LONG                  l;

     ULONG                 ul;

     float                 flt;

     double                dbl;

     unsigned short int    b;

     CURRENCY              cur;

     double                at;

     FILETIME              ft;

     LPSTR                 lpszA;

     SBinary               bin;

     LPWSTR                lpszW;

     LPGUID                lpguid;

     LARGE_INTEGER         li;

     SShortArray           MVi;

     SLongArray            MVl;

     SRealArray            MVflt;

     SDoubleArray          MVdbl;

     SCurrencyArray        MVcur;

     SAppTimeArray         MVat;

     SDateTimeArray        MVft;

     SBinaryArray          MVbin;

     SLPSTRArray           MVszA;

     SWStringArray         MVszW;

     SGuidArray            MVguid;

     SLargeIntegerArray    MVli;

     SCODE                 err;

     LONG                  x;

} _UPV;

 

The members of the _UPV union contain the following values for single valued properties:

_UPV member

Type of single valued property

i

PT_I2

I

PT_LONG (signed)

ul

PT_LONG (unsigned)

flt

PT_R4

dbl

PT_DOUBLE

b

PT_BOOLEAN

cur

PT_CURRENCY

at

PT_APPTIME

ft

PT_SYSTIME

lpszA

PT_STRING8

bin

PT_BINARY

lpszW

PT_UNICODE

lpguid

PT_CLSID

li

PT_I8

 

The following table lists the members of the _UPV union that describe multivalued properties:

_UPV member

Type of multivalued property

MVi

PT_MV_I2

MVI

PT_MV_LONG

MVflt

PT_MV_R4

MVdbl

PT_MV_DOUBLE

MVcur

PT_MV_CURRENCY

MVat

PT_MV_APPTIME

MVft

PT_MV_SYSTEM

MVbin

PT_MV_BINARY

MVszA

PT_MV_STRING8

MVszW

PT_MV_UNICODE

MVguid

PT_MV_CLSID

MVli

PT_MV_I8

 

The final two members of the _UPV union, err and x, describe property values with special types. The err member describes a property of type PT_ERROR and the x member a property of type PT_NULL or PT_OBJECT.