LazyMAPI

MAPIPropUtils

unit: MAPIPropUtils.pas
file path: ..\Library\
version: 2014.хх
uses Classes, Windows, Types, SysUtils, ExtendedMAPI, MAPIUtils, MAPIMacros, IMIEMTypes

Available functions:

function GetPropString  - Returns the value of the property type PT_STRING8 or PT_UNICODE

function GetNamedPropString - Returns the value of MAPINAMED property type PT_STRING8 or PT_UNICODE

function GetPropStringMV - Returns the value of the property type PT_MV_STRING8 or PT_MV_UNICODE


function GetPropLong - Returns the value of the property type PT_LONG or PT_SHORT

function GetNamedPropLong - Returns the value of MAPINAMED property type PT_LONG

function GetPropLongMV - Returns the value of the property type PT_MV_LONG


function GetPropLongLong -  Returns the value of the property type PT_I8

function GetNamedPropLongLong - Returns the value of MAPINAMED property type PT_I8


function GetPropDouble - Returns the value of the property type PT_DOUBLE or PT_APPTIME

function GetPropSingle -  Returns the value of the property type PT_FLOAT


function GetPropSysTime - Returns the value of the property type PT_SYSTIME

function GetNamedPropSysTime -  Returns the value of MAPINAMED property type PT_SYSTIME


function GetPropBoolean -  Returns the value of the property type PT_BOOLEAN

function GetNamedPropBoolean -  Returns the value of MAPINAMED property type PT_BOOLEAN


procedure GetPropBinary -  Returns the value of the property type PT_BINARY

function GetPropBinaryAsString - Returns the value of the property type PT_BINARY as hexadecimal string representation

function GetPropBinaryAsBytes -  Returns the value of the property type PT_BINARY as TBytes

function GetPropMVBinaryAsBytes - Returns the value of the property type PT_MV_BINARY as TBytesArray

function GetNamedPropBinary - Returns the value of MAPINAMED property type PT_BINARY


function GetPropCurrency - Returns the value of the property type PT_CURRENCY

function GetPropDateTime - Returns the value of the property type PT_APPTIME or PT_SYSTIME

function GetPropGUID -  Returns the value of the property type PT_CLSID


function GetNamedPropID - Retrieves property tag that hold the property identifier for named property


procedure SetPropString -  Updates property of type PT_STRING8 or PT_UNICODE

procedure SetNamedPropString - Updates MAPINAMED property of type PT_STRING8 or PT_UNICODE

procedure SetPropStringMV -  Updates property of type PT_MV_STRING8 or PT_MV_UNICODE


procedure SetPropBoolean - Updates property of type PT_BOOLEAN

procedure SetNamedPropBoolean - Updates MAPINAMED property of type PT_BOOLEAN


procedure SetPropDouble - Updates property of type PT_DOUBLE or PT_APPTIME

procedure SetNamedPropDouble - Updates MAPINAMED property of type PT_DOUBLE or PT_APPTIME


procedure SetPropSysTime - Updates property of type PT_SYSTIME

procedure SetNamedPropSysTime - Updates MAPINAMED property of type PT_SYSTIME


procedure SetPropLong - Updates property of type PT_LONG

procedure SetNamedPropLong - Updates MAPINAMED property of type PT_LONG


procedure SetPropLongMV - Updates property of type PT_MV_LONG

procedure SetNamedPropLongMV - Updates MAPINAMED property of type PT_MV_LONG


procedure SetPropBinary - Updates property of type PT_BINARY

procedure SetNamedPropBinary -  Updates MAPINAMED property of type PT_BINARY

procedure SetPropMVBinaryAsBytes -  Updates property of type PT_MV_BINARY


procedure SetPropLongLong -  Updates property of type PT_LONGLONG (PT_I8)

procedure SetNamedPropLongLong -  Updates MAPINAMED property of type PT_LONGLONG (PT_I8)


procedure SetPropSingle - Updates property of type PT_FLOAT

procedure SetPropCurrency - Updates property of type PT_CURRENCY

procedure SetPropDateTime -  Updates property of type PT_SYSTIME or PT_APPTIME

procedure SetPropGUID - Updates property of type PT_CLSID


function GetPropString(const MAPIObject: IMAPIProp; const PropTag: ULONG): String;

description
 Returns the value of the property type PT_STRING8 or PT_UNICODE

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.

note:
 PropType of PropTag should be PT_STRING8 or PT_UNICODE
 Otherwise, an exception error will be raised.

usage

var
  EMail:IMessage; 
  Subject:String; 
 
// Gets Message Subject
        Subject := GetPropString(EMail, PR_SUBJECT);
        ShowMessage(Subject);

Top


function GetNamedPropString(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string): String; overload;
function GetNamedPropString(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG): String; overload;

description
 Returns the value of MAPINAMED property type PT_STRING8 or PT_UNICODE

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)

usage:

var
  CalendarItem:IMessage; 
  OutlookAppointmentNamedProp:TOutlookNamedPropList; 

// Gets a string description of the time zone.

TimeZoneLabel.Caption := GetNamedPropString(CalendarItem, OutlookAppointmentNamedProp[idTimeZoneDescription].GUID_ID^,
    OutlookAppointmentNamedProp[idTimeZoneDescription].PROP_ID);

Top


function GetPropStringMV(const MAPIObject: IMAPIProp; const PropTag: ULONG; List: TStrings): Boolean;

description:
 Returns the value of the property type PT_MV_STRING8 or PT_MV_UNICODE

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
List: TStrings - TStrings receiving each line of the property

note:
 PropType of PropTag should be PT_MV_STRING8 or PT_MV_UNICODE.
 Otherwise, an exception error will be raised.
 The function returns TRUE if the property exists  and its value is <> PT_ERROR.

Top


function GetPropLong(const MAPIObject: IMAPIProp; const PropTag: ULONG): ULONG; overload;
function GetPropLong(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: ULONG): Boolean; overload;

description
 Returns the value of the property type PT_LONG or PT_SHORT

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.

note:
 PropType of PropTag should be PT_LONG or PT_SHORT.
 Otherwise, an exception error will be raised.
 The overloaded function returns TRUE if the property exists and its value is <> PT_ERROR.

usage:

var
  MAPIMessage:IMessage; 
  OutlookAppointmentNamedProp:TOutlookNamedPropList; 

// Gets the code page used for PR_BODY (PidTagBody) or PR_BODY_HTML (PidTagBodyHtml) properties.

 InetCodePage := GetPropLong(MAPIMessage, PR_INTERNET_CPID);

Top


function GetNamedPropLong(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; out Value: ULONG): Boolean; overload;
function GetNamedPropLong(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; out Value: ULONG): Boolean; overload;

description
 Returns the value of MAPINAMED property type PT_LONG

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
Value: ULONG - output, returned value

usage:

var
  CalendarItem:IMessage; 
  OutlookAppointmentNamedProp:TOutlookNamedPropList; 

// Gets Busy Status

if GetNamedPropLong(CalendarItem, OutlookAppointmentNamedProp[idBusyStatus].GUID_ID^, OutlookAppointmentNamedProp[idBusyStatus].PROP_ID, intValue) then
    cbBusyStatus.ItemIndex := intValue;

Top


function GetPropLongMV(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: TIntegerDynArray): Boolean;

description:
 Returns the value of the property type PT_MV_LONG

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: TIntegerDynArray - output, returned value

note:
 PropType of PropTag should be PT_MV_LONG.
 Otherwise, an exception error will be raised.

Top


function GetPropLongLong(const MAPIObject: IMAPIProp; const PropTag: ULONG): Int64; overload;
function GetPropLongLong(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: Int64): Boolean; overload;

description:
 Returns the value of the property type PT_I8

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.

note:
 PropType of PropTag should be PT_I8 or PT_LONG or PT_SHORT.
 Otherwise, an exception error will be raised.

Top


function GetNamedPropLongLong(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; out Value: Int64): Boolean; overload;
function GetNamedPropLongLong(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; out Value: Int64): Boolean; overload;

description
 Returns the value of MAPINAMED property type PT_I8

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
Value: ULONG - output, returned value

Top


function GetPropDouble(const MAPIObject: IMAPIProp; const PropTag: ULONG): Double; overload;
function GetPropDouble(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: Double): Boolean; overload;

description:
 Returns the value of the property type PT_DOUBLE or PT_APPTIME

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: Double - output, returned value

note:
 PropType of PropTag should be PT_DOUBLE or PT_APPTIME.
 Otherwise, an exception error will be raised.

Top


function GetPropSingle(const MAPIObject: IMAPIProp; const PropTag: ULONG): Single; overload;
function GetPropSingle(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: Single): Boolean; overload;

description:
 Returns the value of the property type PT_FLOAT

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: Double - output, returned value

note:
 PropType of PropTag should be PT_FLOAT.
 Otherwise, an exception error will be raised.

Top


function GetPropSysTime(const MAPIObject: IMAPIProp; const PropTag: ULONG; UseTZInfo: Boolean = True): TDateTime; overload;
function GetPropSysTime(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: TDateTime; UseTZInfo: Boolean = True): Boolean; overload;

description:
 Returns the value of the property type PT_SYSTIME

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: Double - output, returned value
UseTZInfo: Boolean - When is TRUE, the output value is converted to the local date and time

note:
 PropType of PropTag should be PT_SYSTIME.
 Otherwise, an exception error will be raised.

Top


function GetNamedPropSysTime(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; out Value: TDateTime; UseTZInfo: Boolean = True): Boolean; overload;
function GetNamedPropSysTime(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; out Value: TDateTime; UseTZInfo: Boolean = True): Boolean; overload;

description
 Returns the value of MAPINAMED property type PT_SYSTIME

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
Value: TDateTime - output, returned value
UseTZInfo: Boolean - When is TRUE, the output value is converted to the local date and time

Top


function GetPropBoolean(const MAPIObject: IMAPIProp; const PropTag: ULONG): Boolean; overload;
function GetPropBoolean(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: Boolean): Boolean; overload;

description:
 Returns the value of the property type PT_BOOLEAN

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: Boolean - output, returned value

note:
 PropType of PropTag should be PT_BOOLEAN.
 Otherwise, an exception error will be raised.

Top

function GetNamedPropBoolean(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string): Boolean; overload;
function GetNamedPropBoolean(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG): Boolean; overload;

description
 Returns the value of MAPINAMED property type PT_BOOLEAN

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)

Top


procedure GetPropBinary(const MAPIObject: IMAPIProp; const PropTag: ULONG; out cbValue: ULONG; out Value: Pointer);

description:
 Returns the value of the property type PT_BINARY

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
cbValue: ULONG - Number of bytes in property
Value: Pointer - output, points to property address variable.

note:
 PropType of PropTag should be PT_BINARY.
 Otherwise, an exception error will be raised.
The user must release the memory occupied by Value by function MAPIFreeBuffer!

Top


function GetPropBinaryAsString(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: string): Boolean;

description:
 Returns the value of the property type PT_BINARY as hexadecimal string representation

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: String - output, hexadecimal string representation of property.

note:
 PropType of PropTag should be PT_BINARY.
 Otherwise, an exception error will be raised.

Top


function GetPropBinaryAsBytes(const MAPIObject: IMAPIProp; const PropTag: ULONG): TBytes;

description:
 Returns the value of the property type PT_BINARY as TBytes

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.

note:
 PropType of PropTag should be PT_BINARY.
 Otherwise, an exception error will be raised.

Top


function GetPropMVBinaryAsBytes(const MAPIObject: IMAPIProp; const PropTag: ULONG): TBytesArray;

description:
 Returns the value of the property type PT_MV_BINARY as TBytesArray

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.

note:
 PropType of PropTag should be PT_MV_BINARY.
 Otherwise, an exception error will be raised.

Top


function GetNamedPropBinary(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string): TBytes; overload;
function GetNamedPropBinary(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG): TBytes; overload;

description
 Returns the value of MAPINAMED property type PT_BINARY

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)

Top


function GetPropCurrency(const MAPIObject: IMAPIProp; const PropTag: ULONG): Currency; overload;
function GetPropCurrency(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: Currency): Boolean; overload;

description:
 Returns the value of the property type PT_CURRENCY

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: Currency - output, returned value

note:
 PropType of PropTag should be PT_CURRENCY.
 Otherwise, an exception error will be raised.

Top


function GetPropDateTime(const MAPIObject: IMAPIProp; const PropTag: ULONG): TDateTime; overload;
function GetPropDateTime(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: TDateTime): Boolean; overload;

description:
 Returns the value of the property type PT_APPTIME or PT_SYSTIME

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: TDateTime - output, returned value

note:
 PropType of PropTag should be PT_APPTIME or PT_SYSTIME.
 Otherwise, an exception error will be raised.
 The PT_SYSTIME is converted to local time, using time zone information

Top


function GetPropGUID(const MAPIObject: IMAPIProp; const PropTag: ULONG): TGUID; overload;
function GetPropGUID(const MAPIObject: IMAPIProp; const PropTag: ULONG; out Value: TGUID): Boolean; overload;

description:
 Returns the value of the property type PT_CLSID

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: TGUID - output, returned value

note:
 PropType of PropTag should be PT_CLSID.
 Otherwise, an exception error will be raised.

Top


function GetNamedPropID(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; TargetType: ULONG; out Value: ULONG; const Create: Boolean = False): Boolean; overload;
function GetNamedPropID(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; TargetType: ULONG; out Value: ULONG; const Create: Boolean = False): Boolean; overload;
function GetNamedPropID(const MAPIObject: IMAPIProp; const NamedProp: TMAPINAMEID; TargetType: ULONG; out Value: ULONG; const Create: Boolean = False): Boolean; overload;

description
 Retrieves property tag that hold the property identifier for named property

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
TargetType: ULONG - Target property type (as PT_STRING8, PT_BINARY, etc)
Value: ULONG - output, returned property tag
Create: Boolean - Assigns a property identifier, if one has not yet been assigned

Top


procedure SetPropString(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: String);

description
 Updates property of type PT_STRING8 or PT_UNICODE

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: String - Contain property value to be updated

note:
 PropType of PropTag should be  PT_STRING8 or PT_UNICODE
 Otherwise, an exception error will be raised.

Top


procedure SetNamedPropString(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; const Value: String); overload;
procedure SetNamedPropString(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; const Value: String); overload;

description
 Updates MAPINAMED property of type PT_STRING8 or PT_UNICODE

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
Value: String - Contain property value to be updated

note:
 PropType of PropTag should be  PT_STRING8 or PT_UNICODE
 Otherwise, an exception error will be raised.

Top


procedure SetPropStringMV(const MAPIObject: IMAPIProp; const PropTag: ULONG; Strings: TStrings);

description
 Updates property of type PT_MV_STRING8 or PT_MV_UNICODE

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: TStrings - Contain property value to be updated

note:
 PropType of PropTag should be  PT_MV_STRING8 or PT_MV_UNICODE
 Otherwise, an exception error will be raised.

Top


procedure SetPropBoolean(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: BOOL);

description
 Updates property of type PT_BOOLEAN

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: BOOL - Contain property value to be updated

note:
 PropType of PropTag should be  PT_BOOLEAN
 Otherwise, an exception error will be raised.

Top


procedure SetNamedPropBoolean(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; const Value: BOOL); overload;
procedure SetNamedPropBoolean(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; const Value: BOOL); overload;

description
 Updates MAPINAMED property of type PT_BOOLEAN

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
Value: BOOL - Contain property value to be updated

note:
 PropType of PropTag should be  PT_BOOLEAN
 Otherwise, an exception error will be raised.

Top


procedure SetPropDouble(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: Double);

description
 Updates property of type PT_DOUBLE or PT_APPTIME

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: Double - Contain property value to be updated

note:
 PropType of PropTag should be PT_DOUBLE or PT_APPTIME
 Otherwise, an exception error will be raised.

Top


procedure SetNamedPropDouble(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; const Value: Double); overload;
procedure SetNamedPropDouble(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; const Value: Double); overload;

description
 Updates MAPINAMED property of type PT_DOUBLE or PT_APPTIME

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
Value: Double - Contain property value to be updated

note:
 PropType of PropTag should be  PT_DOUBLE or PT_APPTIME
 Otherwise, an exception error will be raised.

Top


procedure SetPropSysTime(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: TDateTime; const UseTZInfo: Boolean = True);

description
 Updates property of type PT_SYSTIME

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: TDateTime - Contain property value to be updated

note:
 PropType of PropTag should be PT_SYSTIME
 Otherwise, an exception error will be raised.

Top


procedure SetNamedPropSysTime(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; const Value: TDateTime; const UseTZInfo: Boolean = True); overload;
procedure SetNamedPropSysTime(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; const Value: TDateTime; const UseTZInfo: Boolean = True); overload;

description
 Updates MAPINAMED property of type PT_SYSTIME

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
Value: TDateTime - Contain property value to be updated

note:
 PropType of PropTag should be  PT_SYSTIME
 Otherwise, an exception error will be raised.

Top


procedure SetPropLong(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: ULONG);

description
 Updates property of type PT_LONG

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: ULONG - Contain property value to be updated

note:
 PropType of PropTag should be PT_LONG
 Otherwise, an exception error will be raised.

Top


procedure SetNamedPropLong(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; const Value: ULONG); overload;
procedure SetNamedPropLong(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; const Value: ULONG); overload;

description
 Updates MAPINAMED property of type PT_LONG

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
Value: ULONG - Contain property value to be updated

note:
 PropType of PropTag should be  PT_LONG
 Otherwise, an exception error will be raised.

Top


procedure SetPropLongMV(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: TIntegerDynArray);

description
 Updates property of type PT_MV_LONG

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: TIntegerDynArray - Contain property value to be updated

note:
 PropType of PropTag should be PT_MV_LONG
 Otherwise, an exception error will be raised.

Top


procedure SetNamedPropLongMV(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; const Value: TIntegerDynArray); overload;
procedure SetNamedPropLongMV(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; const Value: TIntegerDynArray); overload;

description
 Updates MAPINAMED property of type PT_MV_LONG

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
Value: TIntegerDynArray - Contain property value to be updated

note:
 PropType of PropTag should be  PT_MV_LONG
 Otherwise, an exception error will be raised.

Top


procedure SetPropBinary(const MAPIObject: IMAPIProp; const PropTag: ULONG; const cbValue: ULONG; const Value: Pointer);

description
 Updates property of type PT_BINARY

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
cbValue: ULONG - count of bytes in Value
Value: Pointer - Contain property value to be updated

note:
 PropType of PropTag should be PT_BINARY
 Otherwise, an exception error will be raised.

Top


procedure SetNamedPropBinary(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; const cbValue: ULONG; const Value: Pointer); overload;
procedure SetNamedPropBinary(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; const cbValue: ULONG; const Value: Pointer); overload;

description
 Updates MAPINAMED property of type PT_BINARY

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
cbValue: ULONG - count of bytes in Value
Value: Pointer - Contain property value to be updated

note:
 PropType of PropTag should be  PT_BINARY
 Otherwise, an exception error will be raised.

Top


procedure SetPropMVBinaryAsBytes(const MAPIObject: IMAPIProp; const PropTag: ULONG; const BytesArray: TBytesArray);

description
 Updates property of type PT_MV_BINARY

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: TBytesArray - Contain property value to be updated

note:
 PropType of PropTag should be PT_MV_BINARY
 Otherwise, an exception error will be raised.

Top


procedure SetPropLongLong(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: Int64);

description
 Updates property of type PT_LONGLONG (PT_I8)

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: Int64 - Contain property value to be updated

note:
 PropType of PropTag should be PT_LONGLONG (PT_I8)
 Otherwise, an exception error will be raised.

Top


procedure SetNamedPropLongLong(const MAPIObject: IMAPIProp; const GUID: TGUID; const ID: ULONG; const Value: Int64); overload;
procedure SetNamedPropLongLong(const MAPIObject: IMAPIProp; const GUID: TGUID; const Name: string; const Value: Int64); overload;

description
 Updates MAPINAMED property of type PT_LONGLONG (PT_I8)

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
GUID: TGUID - GUID structure defining a particular property set (see MAPINAMEID, lpguid member)
Name: string - The name is an Unicode string (see MAPINAMEID, lpwstrName member)
 or
ID: ULONG - The name is an integer value (see MAPINAMEID, lID member)
Value: Int64 - Contain property value to be updated

note:
 PropType of PropTag should be  PT_LONGLONG (PT_I8)
 Otherwise, an exception error will be raised.

Top


procedure SetPropSingle(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: Single);

description
 Updates property of type PT_FLOAT

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: Single - Contain property value to be updated

note:
 PropType of PropTag should be PT_FLOAT
 Otherwise, an exception error will be raised.

Top


procedure SetPropCurrency(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: Currency);

description
 Updates property of type PT_CURRENCY

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: Currency - Contain property value to be updated

note:
 PropType of PropTag should be PT_CURRENCY
 Otherwise, an exception error will be raised.

Top


procedure SetPropDateTime(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: TDateTime);

description
 Updates property of type PT_SYSTIME or PT_APPTIME

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: TDateTime - Contain property value to be updated

note:
 PropType of PropTag should be  PT_SYSTIME or PT_APPTIME
 Otherwise, an exception error will be raised.

Top


procedure SetPropGUID(const MAPIObject: IMAPIProp; const PropTag: ULONG; const Value: TGUID);

description
 Updates property of type PT_CLSID

parameters

MAPIObject: IMAPIProp - Points to a MAPI IMAPIProp interface containing the object.
PropTag: ULONG - Property tag.
Value: TGUID - Contain property value to be updated

note:
 PropType of PropTag should be PT_CLSID
 Otherwise, an exception error will be raised.

Top


Copyright © 2021 IMIBO
Privacy Statement