LazyMAPI

TMAPIPropFields - represents a collection of MAPI property values.
Delphi wrapper object for SPropValue array.

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
Owner: IMAPIProp or PSPropValue

Constructors

Name Description
Create(const oMAPIObject: IMAPIProp) Creates and initializes object instance from IMAPIProp
Create(cValues: ULONG; PropValues: PSPropValue) Creates and initializes object instance from PSPropValue

Properties

Name Access Type Description
Count RO Integer The Count property returns the total number of MAPI Properties.
Item RO TMAPIPropField Represent a single MAPI Property.
ItemOf RO TMAPIPropField Represent a single MAPI Property accessed by PropTag
ItemOfNamed RO TMAPIPropField Represent a single MAPI NAMED Property accessed by NameID and PropSetID
Tags RO TCardinalDynArray Returns an array (PropTags) of existing MAPI Properties inside IMAPIProp object or PSPropValue
Modified RO Boolean Indicates whether the object is changed

Methods

Name Description
PropExists Returns TRUE if property specified by PropTag exists.
PropExists Returns TRUE if property specified as named property (PropNamed) exists.
IndexOf Returns the index of the TMAPIPropField object with a specified PropTag.
Refresh Clear internal cache.
Delete Delete a single MAPI property with a specified PropTag from object.
AddNew Add a new property with a specified PropTag.
AddNew Add a new named property with a specified MAPINAMEID structure.
SaveChanges Makes permanent any changes that were made.

Top


constructor Create(const oMAPIObject: IMAPIProp); overload;

description

Constructs an instance of the TMAPIPropFields class and initializes its values.

usage

procedure TRecurrencePatternExceptionDlg.btPropertiClick(Sender: TObject);
var
  PropFields: TMAPIPropFields;
begin
  if not Assigned(FExceptionMessage) then
    ShowMessage('There is no selected object!')
  else
  begin
    PropFields := TMAPIPropFields.Create(FExceptionMessage.MAPIObject);
    try
      with TFrmMAPIPropFields.Create(Self) do
      begin
        try
          SetPropFields(PropFields);
          ShowModal;
        finally
          Free;
        end;
      end;
    finally
      FreeAndNil(PropFields);
    end;
  end;
end;

Top


Copyright © 2021 IMIBO
Privacy Statement