Copyright © 2024 IMIBO. Privacy Statement
Extended MAPI in DELPHI
LazyMAPI
Included Helper Classes & Objects
TMAPIProperty
Represents a single MAPI Object that support properties.
Delphi wrapper object for IMAPIProp.
unit: MAPIProperty.pas
file path: ..\Library\Helpers
version: 2018.хх
uses Classes, Windows, Types, Variants, SysUtils, ExtendedMAPI, IMIEMTypes, MAPITable, MAPIPropFields;
Unit: | MAPIProperty.pas |
Type: | Class |
Inherited from: | TMAPIBase |
Declaration:
TMAPIProperty = class(TMAPIBase) protected ... public constructor Create(const oMAPIObject: IMAPIProp); virtual; destructor Destroy; override; property Active: Boolean read GetActive write SetActive; property ID: TBytes read GetEntryID; property MAPIObjType; property MAPIObject: IMAPIProp read GetMAPIObject; property MAPISession; property Modified: Boolean read GetModified; property PropertyTags: TCardinalDynArray read GetTags; property PropFields: TMAPIPropFields read GetPropFields; property PropString[const PropTag: Cardinal]: String read GetAsString write SetAsString; property PropBoolean[const PropTag: Cardinal]: Boolean read GetAsBoolean write SetAsBoolean; property PropInteger[const PropTag: Cardinal]: Integer read GetAsInteger write SetAsInteger; property PropInt64[const PropTag: Cardinal]: Int64 read GetAsInt64 write SetAsInt64; property PropSingle[const PropTag: Cardinal]: Single read GetAsSingle write SetAsSingle; property PropDouble[const PropTag: Cardinal]: Double read GetAsDouble write SetAsDouble; property PropCurrency[const PropTag: Cardinal]: Currency read GetAsCurrency write SetAsCurrency; property PropDateTime[const PropTag: Cardinal]: TDateTime read GetAsDateTime write SetAsDateTime; property PropGUID[const PropTag: Cardinal]: TGUID read GetAsGUID write SetAsGUID; property PropBytes[const PropTag: Cardinal]: TBytes read GetAsBytes write SetAsBytes; property PropVariant[const PropTag: Cardinal]: Variant read GetAsVariant; property PropMVInteger[const PropTag: Cardinal]: TIntegerDynArray read GetPropMVLong write SetPropMVLong; property PropMVBytes[const PropTag: Cardinal]: TBytesArray read GetPropMVBinaryAsBytes write SetPropMVBinaryAsBytes; property PropMVString[const PropTag: Cardinal]: TStrings read GetPropMVString write SetPropMVString; function IsPropExists(const PropTag: ULONG): Boolean; overload; function IsPropExists(const NameID: Variant; const PropSetID: TGUID; out PropTag: ULONG): Boolean; overload; procedure DeleteProperty(Const PropTag: ULONG); procedure Update; virtual; function GetNamedList(const NamedPropExList: TMAPINamedPropOrdList; const Create: Boolean; out PropTags: TCardinalDynArray): Boolean; end;
Constructors
Name | Description |
Create(const oMAPIObject: IMAPIProp); virtual; | Creates and initializes object instance from IMAPIProp |
Properties
Name | Access | Type | Description | MAPI Reference | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Active | RW | Boolean | Open/Close the MAPI IMAPIProp object. Resets certain internal fields. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ID | RO | TBytes | The ID property returns the unique identifier of the MAPI object. If object is IAttach ID field contains the value of PR_ATTACH_NUM as TBytes |
PR_ENTRYID, PR_ATTACH_NUM |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MAPIObjType | RO | TMAPIObjType | The MAPIObjType property indicates the type of MAPI object. | PR_OBJECT_TYPE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MAPIObject | RO | IMAPIProp | Returns native MAPI IMAPIProp interfaced object. | IMAPIProp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MAPISession | RO | IMAPISession | Returns native MAPI IMAPISession interfaced object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Modified | RO | Boolean | Indicates whether the object has changed. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropertyTags | RO | TCardinalDynArray | Returns property tags for all properties. The list does not include the properties of type PT_OBJECT / PT_ERROR / PT_NULL | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropFields | RO | TMAPIPropFields | Returns a collection of MAPI property value | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropString | RW | WideString | Obtains the string value of a property from a property tag. Sets a string property. Use this property when the property type is PT_STRING8 or PT_UNICODE. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropBoolean | RW | Boolean | Obtains the Boolean value of a property from a property tag. Sets a Boolean property. Use this property when the property type is PT_BOOLEAN. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropInteger | RW | Integer | Obtains the Integer value of a property from a property tag. Sets an Integer property. Use this property when the property type is PT_LONG or PT_SHORT |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropInt64 | RW | Int64 | Obtains the Int64 value of a property from a property tag. Sets an Int64 property. Use this property when the property type is PT_I8. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropSingle | RW | Single | Obtains the Single value of a property from a property tag. Sets a Single property. Use this property when the property type is PT_FLOAT. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropDouble | RW | Double | Obtains the Double value of a property from a property tag. Sets a Double property. Use this property when the property type is PT_DOUBLE or PT_APPTIME. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropCurrency | RW | Currency | Obtains the Currency value of a property from a property tag. Sets a Currency property. Use this property when the property type is PT_CURRENCY. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropDateTime | RW | TDateTime | Obtains the TDateTime value of a property from a property tag. Sets a TDateTime property. Use this property when the property type is PT_APPTIME or PT_SYSTIME. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropGUID | RW | TGUID | Obtains the TGUID value of a property from a property tag. Sets a TGUID property. Use this property when the property type is PT_CLSID. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropBytes | RW | TBytes | Obtains the TBytes value of a property from a property tag. Sets a TBytes property. Use this property when the property type is PT_BINARY. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropVariant | RO | Variant | Obtains the Variant value of a property from a property tag. Returned value is:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropMVInteger | RW | TIntegerDynArray | Obtains the array of integers of a property from a property tag. Sets an array of integers property. Use this property when the property type is PT_MV_LONG. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropMVBytes | RW | TBytesArray | Obtains the array of TBytes of a property from a property tag. Sets an array of TBytes property. Use this property when the property type is PT_MV_BINARY. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PropMVString | RW | TStrings | Obtains the TStrings of a property from a property tag. Sets a TStrings property. Use this property when the property type is PT_MV_TSTRING. |
Methods
Name | Description |
IsPropExists | Indicates that object property exists.
function IsPropExists(const PropTag: ULONG):Boolean; overload; |
DeleteProperty | Deletes an object property. A deleted property is not permanently deleted until the TMAPIProperty Update method has been called.
procedure DeleteProperty(const PropTag: ULONG); |
Update | Makes permanent any changes that were made to an object since the last save operation.
procedure Update; virtual; |
GetNamedList | Returns list of PropTags for specified MAPINamed properties
function GetNamedList(const NamedPropExList: TMAPINamedPropOrdList; const Create: Boolean; out PropTags: TCardinalDynArray):Boolean; |