A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Trapping RDO (Redemption) Events in Delphi



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old October 26th 08, 07:14 AM posted to microsoft.public.outlook.program_vba
Andrew Lockwood
external usenet poster
 
Posts: 10
Default Trapping RDO (Redemption) Events in Delphi

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 09:51 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.