Class TMyEnumFormatEtc (unit DataObject)

Inherits from

IEnumFormatEtc

There is no support for aggregation for TMyEnumFormatEtc. Enumerators are seperate objects. (see TMyEnumFormatEtc.Query.Interface) fUnkRef is used only to control life time of outer object

Constructors


constructor Create(UnkRef:IUnknown;FormatCount:Integer;FormatList: PFormatList;index:integer);

////////////////////////////////////////////////////////////////////////////// /// TMyEnumFormatEtc //////////////////////////////////////////////////////////////////////////////


Functions

function AddRef: Longint;

** Enumerators are seperate objects, not the data objects, so we only need ** to support our IUnknown and IEnumFORMATETC interfaces here, with no ** concern for agregation

function Clone(var enum: IEnumFormatEtc): HResult;


destructor Destroy;

copy format array ok,ok, it is not nessessary to copy the array, but I did that, because that is the way it is done in IOL2

function Next(celt: Longint; var elt;pceltFetched: PLongint): HResult;


function QueryInterface(const iid: TIID; var obj): HResult;


function Release: Longint;

keep the data objects, that defines the contex of the enumerator alive

function Reset: HResult;

IOL2 returns NOERROR.

function Skip(celt: Longint): HResult;

IOL2 returns NOERROR.

Properties

Events

Variables

FFormatCount : Integer;


FFormatList : PFormatList;

current element

FIndex : integer;

IUnknown for ref.

FRefCount : Integer;


fUnkRef : IUnknown;

object reference counting


Constructors


constructor Create(UnkRef:IUnknown;FormatCount:Integer;FormatList: PFormatList;index:integer);

////////////////////////////////////////////////////////////////////////////// /// TMyEnumFormatEtc //////////////////////////////////////////////////////////////////////////////


Functions


function AddRef: Longint;

** Enumerators are seperate objects, not the data objects, so we only need ** to support our IUnknown and IEnumFORMATETC interfaces here, with no ** concern for agregation


function Clone(var enum: IEnumFormatEtc): HResult;


destructor Destroy;

copy format array ok,ok, it is not nessessary to copy the array, but I did that, because that is the way it is done in IOL2


function Next(celt: Longint; var elt;pceltFetched: PLongint): HResult;


function QueryInterface(const iid: TIID; var obj): HResult;


function Release: Longint;

keep the data objects, that defines the contex of the enumerator alive


function Reset: HResult;

IOL2 returns NOERROR. win32sdk states that S_OK should be returned if the number of elements skipped is celt; otherwise S_FALSE.


function Skip(celt: Longint): HResult;

IOL2 returns NOERROR. win32sdk states that S_OK should be returned if the number of elements returned is celt; S_FALSE otherwise.


Properties


Events


Variables


FFormatCount : Integer;


FFormatList : PFormatList;

current element


FIndex : integer;

IUnknown for ref. counting


FRefCount : Integer;


fUnkRef : IUnknown;

object reference counting