IMainOE.OnNewFile

Author Message
Andrey 04/27/2007 10:10 am
Hallo Oleg!

We are using OE via OLE and have some problems with IMainOE.OnNewFile event: the event is fired only for the first file downloded from site... Why it can be so?

We are using C# .NET 2.0.

Thanks you for your attention.
Oleg Chernavin 04/27/2007 10:45 am
Well, most probably, it is a kind of the call mismatch. Offline Explorer Enterprise was developed using Borland Delphi. Perhaps, C# integration with OLE Automation has some differencies. I inspected the code in Offline Explorer and it looks correct.

I have no experience in C# myself, so I don't know how to help here. Are other event calls happen only once?

Best regards,
Oleg Chernavin
MP Staff
Andrey 04/28/2007 08:26 am
Can you make a version with logging? May it will be a key to find out what is happening?

> Well, most probably, it is a kind of the call mismatch. Offline Explorer Enterprise was developed using Borland Delphi. Perhaps, C# integration with OLE Automation has some differencies. I inspected the code in Offline Explorer and it looks correct.
>
> I have no experience in C# myself, so I don't know how to help here. Are other event calls happen only once?
>
> Best regards,
> Oleg Chernavin
> MP Staff
Oleg Chernavin 04/30/2007 08:37 pm
OK. Here is a version that will create a c:\oe.log file when saving files and reporting them to OLE Automation events:

http://www.metaproducts.com/download/betas/OEE_LOG.ZIP

Oleg.
Oleg Chernavin 05/02/2007 08:08 am
Does the log contain 3x2000 lines? If yes, then the code in Offline Explorer works well, but the even notification stops somewhere in the OLE Automation code in Windows.

Oleg.
Andrey 05/02/2007 08:33 am
Yes, the log file has 3 * [Number of files] strings... Is there any way to avoid this problem?
Oleg Chernavin 05/02/2007 08:43 am
Well, my code works correctly according to the log. Frankly, I don't know what exactly could be done here.

I can offer you another way - if your application has a window handle, you can pass it to Offline Explorer:

oe.exe /hwnd=xxxxxx

where xxxxxx is a decimal (not hex) hWnd value. Offline Explorer will send WN_COPYDATA messages with the details about every file downloaded and saved.

Oleg.
Andrey 05/04/2007 11:11 am
Thank you very much for a /hwnd key!
But we faced with another problem - WM_COPYDATA message, as it seems to be, must contain ProjectID of downloaded file... But it always has a "zero" value... This information is of great importance for us...

What should I do?
Oleg Chernavin 05/04/2007 02:06 pm
I will fix it now. If you need the updated version shortly, please let me know.

Oleg.
Andrey 05/05/2007 07:17 am
Thank you very much!

It will be nice to test new version on monday.
Oleg Chernavin 05/05/2007 09:00 am
OK. I uploaded the updated version here:

http://www.metaproducts.com/download/betas/OEE2594.ZIP

Oleg.
Andrey 05/07/2007 01:31 am
Well, are you sure this version is new? I have the same problems - ID is always equal to 0...
Oleg Chernavin 05/07/2007 05:06 am
Yes, ID is 0 for compatibility. But there is IID field.

Oleg.