How to handle OnNewFile event using OLE automation

Author Message
Will 07/01/2009 02:02 pm
Hi, I can''t figure out how to handle OnNewFile event of IMainOE object in Delphi. How would such a procedure look like in OLE example for Delphi which is provided with OEE.
Thanks.
Oleg Chernavin 07/01/2009 02:30 pm
I haven''t made its client-side Delphi implementation myself yet. However some users reported that events work well in C++.

Can you please look at the article:

http://www.blong.com/Conferences/IConUK2000/DelphiMoreAutomation/More%20Automation%20In%20Delphi.htm

Please scroll to the text:
A Handcrafted Automation Client Event Sink

Let me know if you manage to make it or not. Thank you!

Best regards,
Oleg Chernavin
MP Staff
Will 07/01/2009 04:15 pm
:) The funny thing is that the www.blong.com page is the one that I''ve read before posting here. But, to be frank, I don''t know Delphi that well. I''m an amature programmer and for the most part what was written there is too advanced for me.

Thank you the information anyway.
Will.
Will 07/02/2009 08:09 am
I think I''ve got to take my words back. I did figure out how to handle the OnNewFile event. It was actually quite easy, even considering my meager knowledge of Delphi.

But another problem has arisen. OnNewFile event does not give urls and filenames (i didn''t check other parameters) for all of the downloaded files. For example, I downloaded seven files from the staring url:
http://www.google.com/search?hl=en&client=opera&rls=en&hs=Ydf&ei=uJtMSrLtK86OsAb-xZihBA&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=offline+explorer&spell=1

and dumped url and filename parameters to the textfile. Only one file was reported: http://www.google.com/images/nav_logo6.png, c:\download\www.google.com\images\nav_logo6.png.

It really hoped to take a look at all url/filename pairs so that I could overcome the habit of OEE to parse long links (>256 characters) with filenames that do not correspond to the ones written on the disc (the string of characters that is attached to the cropped filename is invariably different for the link and the actual name of the file). It''s quite important because I don''t export projects.
Philippe 12/16/2011 01:05 pm
Hi Will

Can you please explain how you got the onnewfileevent to work in delphi?

regards
philippe