![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Apologies for posting a question about Delphi, but I cannot find an active
Delphi forum for this type of issue. Can anyone explain to me / show me some sample code for trapping the events of an RDOMail item, for example. I have tried creating a wrapper as follows TRDOMailItem = class(TOleServer) private FIntf : IRDOMail; FOnModified : TNotifyEvent; FOnDeleted : TNotifyEvent; FOnMoved : TNotifyEvent; FOnClose : TNotifyEvent; function GetDefaultInterface: IRDOMail; //FOnMovedEx : (const OldParentEntryId: WideString; const NewParentEntryID: WideString); dispid 5; protected procedure Connect; procedure ConnectTo(svrIntf : IRDOMail); procedure Disconnect; override; procedure InitServerData; override; procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override; public //need to add more events property OnModified : TNotifyEvent read FOnModified write FOnModified; property OnDeleted : TNotifyEvent read FOnDeleted write FOnDeleted; property OnMoved : TNotifyEvent read FOnMoved write FOnMoved; property OnClose : TNotifyEvent read FOnClose write FOnClose; end; procedure TRDOMailItem.InitServerData; const CServerData: TServerData = ( ClassID: '{02ABB20A-FB8A-4433-8D66-135C6CCD0F32}'; //Class_xxx IntfIID: '{D85047E0-7767-4D48-86B6-28BDB5728ABB}'; //IID_xxx EventIID: '{0D00E38E-315D-49D5-9331-80BC1559C0E7}'; //DIID_xxx LicenseKey: nil; Version: 500); begin ServerData := @CServerData; end; procedure TRDOOutlookServer.Connect; var punk: IUnknown; begin if FIntf = nil then begin punk := GetServer; ConnectEvents(punk); Fintf:= punk; end; end; but it doesn't work - it complies and runs OK, but the InvokeEvent procedure is never executed, so I cannot capture the events. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Missing Redemption Events | DG | Outlook and VBA | 1 | November 28th 07 01:50 PM |
Inspector and trapping of shortcuts | Petr Nehez | Add-ins for Outlook | 0 | December 22nd 06 09:34 AM |
RDO (Redemption Objects) with events in VB 6.0 | [email protected] | Add-ins for Outlook | 1 | October 13th 06 06:06 PM |
Redemption Trapping a Condition or a Setting | bobdydd | Outlook - General Queries | 3 | June 2nd 06 02:55 PM |
Redemption Trapping a Condition or a Setting | bobdydd | Outlook and VBA | 3 | June 2nd 06 02:55 PM |