The TMAPIPropField - Delphi SPropValue wrapper object.
unit: MAPIPropFields.pas
file path: ..\Library\Helpers
version: 2014.хх
uses Classes, Windows, Types, SysUtils, Contnrs, ExtendedMAPI,
MapiUtils, IMIEMTypes
| Unit: | MAPIPropFields.pas |
| Type: | Class |
| Inherited from: | TMAPIBase |
Constructors
| Name | Description |
| Create(const aPropTag: ULONG; const oMAPIProp: IMAPIProp); | Creates and initializes object instance from IMAPIProp |
Properties
| Name | Access | Type | Description |
| PropName | RO | String | The PropName property returns the property name as a string (PropTag). |
| PropTag | RO | ULONG | Returns property PropTag |
| PropType | RO | ULONG | Returns property type (PropType). Low 16 bits from PropTag. |
| PropID | RO | ULONG | A property identifier (PropID). High 16 bits from PropTag. |
| IsMultiValued | RO | Boolean | Indicates that property is Multivalued. |
| IsNamed | RO | Boolean | Indicates that property is PropNamed. |
| PropSetID | RO | PGUID | If property is named, returns pointer to a GUID property set. Otherwise it is nil. |
| CustomName | RO | String | If property is named, returns custom name. If named property have number for name, returns string representation of number, formatted as '$%.04x'. |
| AsString | RW | String | Get/Set property value as a string. if IsMultiValued is TRUE, Get AsString uses as delimiter global variable MV_DELIM = #13#10. You can Set AsString only if PropType is PT_STRING8 or PT_UNICODE. |
| AsBoolean | RW | Boolean | Get/Set PT_BOOLEAN value. If PropType is not PT_BOOLEAN, exception is raised. |
| AsInteger | RW | Integer | Get/Set PT_I2 or PT_LONG value. If PropType is not PT_I2 or PT_LONG, exception is raised. |
| AsInt64 | RW | Int64 | Get/Set PT_I8 value. If PropType is not PT_I2 or PT_LONG or PT_I8 on Get, and PT_I8 on Set, exception is raised. |
| AsSingle | RW | Single | Get/Set PT_R4 value. If PropType is not PT_R4, exception is raised. |
| AsDouble | RW | Double | Get/Set PT_DOUBLE value. If PropType is not PT_R4 or PT_DOUBLE or PT_CURRENCY or PT_APPTIME on Get, and PT_DOUBLE or PT_APPTIME on Set, exception is raised. |
| AsCurrency | RW | Currency | Get/Set PT_CURRENCY value. If PropType is not PT_CURRENCY, exception is raised. |
| AsDateTime | RW | TDateTime | Get/Set
PT_APPTIME or
PT_SYSTIME value.
If PropType is not
PT_APPTIME or
PT_SYSTIME,
exception is raised. Note: PT_SYSTIME is converted from UTC to Local DateTime on Get, and from Local DateTime to UTC on Set. |
| AsGUID | RW | TGUID | Get/Set PT_CLSID value. If PropType is not PT_CLSID, exception is raised. |
| AsBytes | RW | TBytes | Get/Set property value as a TBytes. If value cannot be converted from/to TBytes, exception is raised. |
| Value | RW | Variant | Get/Set property value as a Variant. If Property value cannot be converted to/from Variant, exception is raised. |
| RawData | RO | PSPropValue | Returns a RAW (native) MAPI property value structure (SPropValue). |
| MV | RO | TMAPIMultiValue | Returns TMAPIMultiValue object if IsMultiValued is TRUE. |
Methods
| Name | Description |
| SaveToStream | Save property value to TStream, if property value can be accessed as IStream, otherwise raises exception. |
| LoadFromStream | Update property value from TStream, if property value can be accessed as IStream, otherwise raises exception. |
| Delete | Marks property for deleting from MAPI Object. Calling Update is need for real Delete operation. |
| Update | Commit changes to MAPI Object. if Permanent parameter is TRUE, IMAPIProp.SaveChanges is called, otherwise only IMAPIProp.SetProps is called. You can also call TMAPIPropFields.SaveChanges to save changes to MAPI IMAPIProp object. |
Copyright © 2021 IMIBO
Privacy Statement |