Copyright © 2024 IMIBO. Privacy Statement
Extended MAPI in DELPHI
LazyMAPI
Included Helper Classes & Objects
TMAPIMultiValue
Delphi wrapper object for MAPI MultiValued SPropValue structure.
unit: MAPIPropFields.pas
file path: ..\Library\Helpers
version: 2018.хх
uses Classes, Windows, Types, SysUtils, Contnrs, ExtendedMAPI, MapiUtils, IMIEMTypes
Unit: | MAPIPropFields.pas |
Type: | Class |
Inherited from: | TObject |
Declaration:
TMAPIMultiValue = class(TObject) protected ... public property Count: Integer read GetCount; property Value[const Index: Integer]: Variant read GetPropValue write SetPropValue; default; property AsInteger[const Index: Integer]: Integer read GetAsInteger write SetAsInteger; // OK property AsInt64[const Index: Integer]: Int64 read GetAsInt64 write SetAsInt64; // OK property AsSingle[const Index: Integer]: Single read GetAsSingle write SetAsSingle; // OK property AsDouble[const Index: Integer]: Double read GetAsDouble write SetAsDouble; // OK property AsCurrency[const Index: Integer]: Currency read GetAsCurrency write SetAsCurrency; // OK property AsGUID[const Index: Integer]: TGUID read GetAsGUID write SetAsGUID; // // OK property AsDateTime[const Index: Integer]: TDateTime read GetAsDateTime write SetAsDateTime; // OK property AsString[const Index: Integer]: WideString read GetAsString write SetAsString; // OK property AsBytes[const Index: Integer]: TBytes read GetAsBytes write SetAsBytes; // OK procedure Delete(const Index: Integer); end;
Properties
Name | Access | Type | Description |
Count | RO | Integer | Returns number of property values in property. |
AsString | RW | String | Get/Set property value as a string. You can Set AsString only if PropType is PT_MV_STRING8 or PT_MV_UNICODE . Zero based index. |
AsInteger | RW | Integer | Get/Set PT_MV_I2 or PT_MV_LONG value. If PropType is not PT_MV_I2 or PT_MV_LONG, exception is raised. Zero based index. |
AsInt64 | RW | Int64 | Get/Set PT_MV_I8 value. If PropType is not PT_MV_I2 or PT_MV_LONG or PT_MV_I8 on Get, and PT_MV_I8 on Set, exception is raised. Zero based index. |
AsSingle | RW | Single | Get/Set PT_MV_R4 value. If PropType is not PT_MV_R4, exception is raised. Zero based index. |
AsDouble | RW | Double | Get/Set PT_MV_DOUBLE value. If PropType is not PT_MV_DOUBLE or PT_MV_APPTIME, exception is raised. Zero based index. |
AsCurrency | RW | Currency | Get/Set PT_CURRENCY value. If PropType is not PT_CURRENCY, exception is raised. Zero based index. |
AsDateTime | RW | TDateTime | Get/Set PT_MV_APPTIME or PT_MV_SYSTIME value. If PropType is not PT_MV_APPTIME or PT_MV_SYSTIME, exception is raised. Zero based index. Note: PT_MV_SYSTIME is converted from UTC to Local DateTime on Get, and from Local DateTime to UTC on Set. |
AsGUID | RW | TGUID | Get/Set PT_MV_CLSID value. If PropType is not PT_MV_CLSID, exception is raised. Zero based index. |
AsBytes | RW | TBytes | Get/Set property value as a TBytes. If value cannot be converted from/to TBytes, exception is raised. Zero based index. |
Value | RW | Variant | Get/Set property value as a Variant. If Property value cannot be converted to/from Variant, exception is raised. Zero based index. |
Methods
Name | Description |
Delete | Delete a single property value from collection. |
Note: To add a new single property in collection, just set appropriate property AsXXXX with index equal to Count.