LazyMAPI

TMAPIProperty - represents a single MAPI Object that support properties.
Delphi wrapper object for IMAPIProp.

unit: MAPIProperty.pas
file path: ..\Library\Helpers
version: 2014.хх
uses
Classes, Windows, Types, Variants, SysUtils, Contnrs, ExtendedMAPI, MAPIUtils, IMIEMTypes, MAPITable, MAPIPropFields;

Unit: MAPIProperty.pas
Type: Class
Inherited from: TMAPIBase

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_I4 or PT_LONG or PT_I2 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 or PT_LONGLONG.
 
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_R4 or 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_R8 or 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:
MAPI PropType Variant Type - TVarData(Result).VType
PT_SHORT varSmallint
PT_LONG varInteger
PT_I8 varInt64
PT_FLOAT varSingle
PT_DOUBLE varDouble
PT_BOOLEAN varBoolean
PT_APPTIME varDate
PT_SYSTIME varDate
PT_STRING8 varOleStr
PT_UNICODE varOleStr
PT_BINARY varArray of varByte
PT_CLSID varOleStr TGUID value is converted to string using SysUtils function GUIDToString.
PT_CURRENCY varCurrency
PT_MV_I2 varArray of varSmallint
PT_MV_LONG varArray of varInteger
PT_MV_R4 varArray of varSingle
PT_MV_DOUBLE varArray of varDouble
PT_MV_CURRENCY varArray of varCurrency
PT_MV_APPTIME varArray of varDate
PT_MV_SYSTIME varArray of varDate
PT_MV_BINARY varArray of varArray of varByte
PT_MV_STRING8 varArray of varOleStr
PT_MV_UNICODE varArray of varOleStr
PT_MV_CLSID varArray of varOleStr. Each TGUID value is converted to string using SysUtils function GUIDToString.
PT_MV_I8 varArray of varInt64
PT_ERROR varInteger
PT_OBJECT varInteger (no usable value)
 
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_BINARY.
 

Methods

Name Description
IsPropExists Indicates that object property exists.

function IsPropExists(const PropTag: ULONG): Boolean; overload;
function IsPropExists(const NameID: Variant; const PropSetID: TGUID; out 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;
 
 
 
Custom classes - do not use them directly in your code!
 
TMAPICustomHolder = class(TMAPIProperty)
  protected
    FFolders: TMAPIFolders;
    FFolderNoCache: Boolean;
    function GetFolders: TMAPIFolders; virtual; abstract;
  public
    constructor Create(const oMAPIObject: IMAPIProp); override;
    destructor Destroy; override;
    property Folders: TMAPIFolders Read GetFolders;
 
    property NoCache: Boolean read FFolderNoCache write FFolderNoCache default True;
  end;
 
 
property Folders - Collection representing the folders/subfolders.
property NoCache - If Microsoft Office Outlook is in Cached Exchange Mode, setting TRUE will open an item or a folder on the remote store. 

Top


Copyright © 2021 IMIBO
Privacy Statement