IOEConnection properties

Author Message
Jo A. Kim 03/26/2007 03:34 am
Hi Oleg,

is it possible to add a new property to the connection-object where i can find an information about the localpath where a downloaded file has been written to?
I have to put the files to a DB and during download I dont know to which project the downloaded files belongs

With this information it would bee very easier to me, to assign the files to the right project and put them to the DB. At this time I must wait until the download is finished and check for Mapentries. It takes a lot of time.

Best Regards
Jo. A. Kim
Oleg Chernavin 03/26/2007 03:59 am
What if you would use the IMainOE.OnNewFile event? It contains the filename:

[
id(0x000000C9)
]
HRESULT OnNewFile([in] long IID, [in] BSTR URL, [in] BSTR Filename, [in] BSTR MIME, [in] BSTR Referer, [in] long AbsLevel );

Best regards,
Oleg Chernavin
MP Staff
Jo A. Kim 03/26/2007 04:33 am

it would be perfect but this event do never raise!

myBase = new OE.MainOEClass();

myBase.OnNewFile+=new OE.IMainOEEvents_OnNewFileEventHandler(myBase_OnNewFile);

best regards

Jo A. Kim
Oleg Chernavin 03/26/2007 04:38 am
Can you check, if the other events raise?

Oleg.
Jo A. Kim 03/26/2007 05:23 am

if I try to assign the 'OnNewProject' event i get the exception

System.Runtime.InteropServices.ComTypes.IConnectionPoint.Advise(Object pUnkSink, Int32& pdwCookie)
bei OE.IMainOEEvents_EventProvider.add_OnNewProject(IMainOEEvents_OnNewProjectEventHandler )

the same accours with 'OnProjectSettingsChanged'
Jo A. Kim 03/26/2007 05:28 am

it happens with every event!

The first one I assing will be accepted and every following will generate an exception!
Oleg Chernavin 03/26/2007 05:31 am
Maybe it is because of the way you assign events? Are you using C#?

Oleg.
Oleg Chernavin 03/26/2007 05:32 am
I checked the code that calls events and it looks well. I will continue looking just in case there is something else wrong.

Oleg.
Jo A. Kim 03/26/2007 05:33 am

yes I do:

myBase.OnNewFile += new OE.IMainOEEvents_OnNewFileEventHandler(myBase_OnNewFile);
myBase.OnNewProject += new OE.IMainOEEvents_OnNewProjectEventHandler(myBase_OnNewProject);
myBase.OnProjectSettingsChanged += new OE.IMainOEEvents_OnProjectSettingsChangedEventHandler(myBase_OnProjectSettingsChanged);
Jo A. Kim 03/26/2007 06:15 am

Hi Oleg,

I just tryed the vb-sample which is included and also there no event ( I tryed 'OnNewFile') is raised!

But I have another problem:

I am not able to load the thumbernails from this site:

http://www.cdu-bw.de/service/bildergalerie

here the properties:

[Object]
OEVersion=Enterprise 4.7.0.2575
Type=0
IID=7193
Caption=http://www.cdu-bw.de/service/bildergalerie/
URL=http://www.cdu-bw.de/service/bildergalerie/
Lev=1000001
Weekday=257
LimTSize=10000
LimNumber=5000
LimTime=100
FMGroup=1
FTText.Exts=htmlhtmaspaspxjspstmstmlidcshtmlhtxtxttextxspxmlrxmlcfmwmlphpphp3
FTImages.Exts=gifjpgjpegtiftiffxbmfifbmppngipxjp2j2cj2kwbmplwf
FTVideo.Exts=mpgavianimpegmovflvfliflcvivrmramrvasfasxwmvm1vm2vvob
FTAudio.Exts=wavriffmp3midmp2m3uravocwmaape
FTArchive.Exts=ziparcgzzarjlhalayleirarcabtarpakacejarpdftgz
FTUDef.Exts=jscssssivbsdtdxslswfclass
FTText.B=ooxooo
FTImages.B=ooxooo
FTVideo.B=ooxooo
FTAudio.B=ooxooo
FTArchive.B=ooxooo
FTUDef.B=ooxooo
FTOther.B=ooxooo
FTSizes=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,0,3,0
RSrvsBx=1
RPathBx=1
RProt=127
LastStart=16:231:28:78:241:31:227:64:
LastEnd=185:26:79:80:241:31:227:64:
S200=111
SPar=69
SSav=111
SLast=200
SSiz=1121775
SMdf=60
LFiles=155
LSize=1121775
Flags=1
ImgDim=0,0,0,0
PrevURL=http://www.cdu-bw.de/service/bildergalerie/
ParseComplexScripts=True
Oleg Chernavin 03/26/2007 06:55 am
OK. I fixed loading links from that site. I will work on the events now.

Oleg.
Oleg Chernavin 03/26/2007 08:03 am
I added the IOEConnection.Filename - it is faster than making an event-driven test application:

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

Oleg.
Jo A. Kim 03/26/2007 09:08 am

Tank You,

but if You find time to see the bug with the events would be great.

Jo. A. Kim
Oleg Chernavin 03/26/2007 09:16 am
Yes, I will try.

Oleg.
Jo A. Kim 03/26/2007 03:07 pm

Oleg,

this way seems not to be sure to scan the downloaded files.
Please look for the other solution raising events

Tanks
Jo A. Kim
Jo A. Kim 03/27/2007 12:56 pm
> Yes, I will try.
>
> Oleg.

Hi Oleg,

Iam waiting to use the events.

When do You think, I can get a new update??

Best regards
jo A. Kim
Oleg Chernavin 03/27/2007 02:17 pm
Sorry. I haven't come with a solution yet. It may take some time.

Oleg.
Oleg Chernavin 03/29/2007 02:15 pm
We develop Offline Explorer using Delphi. And it could be specific to Delphi applications somehow. What about a faster way - to send a Windows message to your application window with the information about newly downloaded files?

Oleg.
Jo A. Kim 03/30/2007 04:53 pm

Its ok!

How can I receive this message?
Oleg Chernavin 03/31/2007 04:12 am
This is easy - start it from the command line:

oe.exe /hWnd=4365866

and this window will get the WM_COPYDATA message. wParam will contain OE window handle, lParam - pointer to the CopyDataStruct. This structure contains text with the data regarding the file.

Oleg.
Jo A. Kim 04/03/2007 06:59 am

Hi Oleg,

I do not start OE. Using the OLE-interface I create a reference object, and do not need to check if OE is already running or not. Is there maybe another possibility to register the window handler? Maybe in the constructor?

best regards
Jo A. Kim
Oleg Chernavin 04/03/2007 09:18 am
Simply run that command. The /hwnd parameter will be passed to the running copy of OE.

Oleg.
Jo A. Kim 04/03/2007 11:03 am

OK, I receive the data but ID is allways=0!!!


best regards
Jo A. Kim
Oleg Chernavin 04/03/2007 11:39 am
Yes. Do you need ID of the Project there?

Oleg.
Jo A. Kim 04/04/2007 01:37 am

It is the proper way to assign the data to the right project! Istnt it?
Jo A. Kim 04/04/2007 11:57 am
Hi Oleg

the solution with /hWnd does not work on a 64bit machine!

Please have a look for an universal solution!

Thanks
Jo A. Kim
Oleg Chernavin 04/05/2007 08:08 am
What happens on Windows 64-bit? Is there a compatible window handle somehow?

Oleg.
Jo A. Kim 04/05/2007 10:42 am
I receive the Message but the there is no data (the string is empty)

here is the code

COPYDATASTRUCT CD =
(COPYDATASTRUCT)m.GetLParam(typeof(COPYDATASTRUCT));
byte[] B = new byte[CD.cbData];
IntPtr lpData = new IntPtr(CD.lpData);
System.Runtime.InteropServices.Marshal.Copy(lpData, B, 0, CD.cbData);
string strData = Encoding.Default.GetString(B);


the value of cbData is 0.

On a 32Bit system it works fine.
Oleg Chernavin 04/05/2007 10:53 am
Maybe the COPYDATASTRUCT declaration is different for 64-bit system? I send a standard message there. Is there any other way to workaround this with the message?

Oleg.
Jo A. Kim 04/06/2007 06:43 am
> Maybe the COPYDATASTRUCT declaration is different for 64-bit system? I send a standard message there. Is there any other way to workaround this with the message?
>
> Oleg.

I will check it, but it will take some time, because the customer has an x64 machine but me not!

best regards
Jo A. Kim
Jo A. Kim 04/07/2007 04:16 pm
FYI

It works! I changed the COPYDATASTRUCT:

before:

struct COPYDATASTRUCT
{
public int dwData;
public int cbData;
public int lpData;
}

now:
struct COPYDATASTRUCT
{
public IntPtr dwData;
public int cbData;
public IntPtr lpData;
}
Oleg Chernavin 04/07/2007 04:26 pm
Great! I will work on the GetLinksFromHTML2 issue this Monday.

Oleg.
Jo A. Kim 04/07/2007 04:28 pm
have a nice WE
Oleg Chernavin 04/08/2007 04:11 am
Thank you!

Oleg.
Jo A. Kim 04/20/2007 03:16 am
Hi Oleg,

the WM_COPYDATA message do not notify me about all the files which I can find with the method 'GetMapEntry'. Why not? Is this correct? Iam not sure if the Message really notify my app about every(!!!) downloaded file. The projectproperty 'Modificationcheck' is 'OEMC_AllFiles '.

Best Regards
Jo A. Kim

Oleg Chernavin 04/20/2007 07:40 am
Map file contains all files that were loaded for the Project. It may contain entries that were loaded in previous downloads. Maybe this is the case? Our tests showed that the message sends info about all files.

Oleg.
Jo A. Kim 04/20/2007 09:01 am

Hi Oleg,

no, this is not the situation, because every time I start the OEE I delete all the projects (OE.OEDeleteOptions.OEDO_Project) and create the project again even to avoid something like this!

I have also another problem:
"Access violation at address 0072F8FF in module 'OE.EXE'. Read of address 6D2F3764."

What could it be?

Best regards
Jo A. kim
Oleg Chernavin 04/20/2007 09:15 am
Does the error happen when you stop the download? How it could be reproduced (on some particular site)?

Oleg.

Jo A. Kim 04/20/2007 11:03 am
I can not reproduce this error!
Jo A. Kim
Oleg Chernavin 04/21/2007 05:27 am
OK. Meanwhile, let's try to reproduce the fails in the messages flow. Is it possible to make a small Project that downloads inimal amount of files and reproduces misses in the messages?

Oleg.
Jo A. Kim 04/24/2007 03:09 am

Hi Oleg,
excuse the delay, but I was busy!

I have a small project wich downloads 130 files with this properties:

[Object]
OEVersion=Enterprise 4.7.0.2585
Type=0
IID=8121
Caption=Angela Merkel
URL=http://www.angela-merkel.de/
Lev=1000000
LimBTime=True
LimTSize=10000
LimNumber=5000
LimTime=180
FMGroup=1
FTText.Exts=aspaspxcfmhtmhtmlhtxidcjspphpphp3rxmlshtmlstmstmltexttxtwmlxmlxsp
FTImages.Exts=bmpfifgifipxidcjspj2cj2kjp2jpegjpglwfpngtiftiffwbmpxbm
FTVideo.Exts=aniasfasxaviflcfliflvm1vm2vmovmpegmpgramrmrvvivvobwmv
FTAudio.Exts=apem3umidmp2mp3rariffvocwavwma
FTArchive.Exts=acearcarjcabgzjarlayleilhapakpdfrartartgzzzip
FTUDef.Exts=classcssdtdjsssiswfvbsxsl
FTText.B=ooxooo
FTImages.B=ooxooo
FTVideo.B=ooxooo
FTAudio.B=ooxooo
FTArchive.B=ooxooo
FTUDef.B=ooxooo
FTOther.B=ooxooo
FTSizes=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,0,3,0
RSrvsBx=1
RProt=-1
LastStart=132:106:171:105:139:35:227:64:
LastEnd=245:43:216:112:139:35:227:64:
S200=130
SPar=74
SSav=130
SLast=200
SSiz=68088371
LFiles=130
LSize=68088371
ApplyAllSubsts=True
ImgDim=0,0,0,0
PrevURL=http://www.angela-merkel.de/
ParseComplexScripts=True
ConvertRSS=True

before I start the download, I delete the projet, so I am sure the mapentries are cleared!

OE.OEFolder fo = myBase.GetFolder();
myBase.Delete(OE.OEDeleteOptions.OEDO_Project);
myBase = fo.AddProject();
WriteProperties();

I did 2 downloads.
After the downloads I compare the mapentries and the list I get over WM_COPY.
The first download was OK!
After the second download I found a Mapentry ('www.angela-merkel.de\images\politik_aktuelles.jpg'), which I did not receive over WM_COPY!

For me, it could be OK to compare both lists after download! But is the Mapentries-List really complete? I am afraid, if I would compare the Mapentries with another list, I would again get a difference!
I put the files to a DB and I must get the complete list of the downloaded files absolutely reliable!

Best Regards
Jo A. Kim
Oleg Chernavin 04/24/2007 01:19 pm
I made a simple application that receives the info. I made several downloads and every time it recorded the same number of files received via WM_COPYDATA. The file www.angela-merkel.de\images\politik_aktuelles.jpg was in every run. The Map also contained the same entries amount. I even compared the lists with each other - they were the same.

I don't think that messages may be lost - the speed of Windows messages is anyway much higher than you download data. In any case, Map will contain the most complete information about downloaded files.

Oleg.
Jo A. Kim 04/26/2007 08:17 am

Hi Oleg,

I will also read the Mapentries!

Other question:

How can I set the option 'Explore all possible subdirectories' via OLE?

best regards

Jo A. Kim
Oleg Chernavin 04/26/2007 04:19 pm
I added it. We plan to release 4.7 version on the next week.

Oleg.
Jo A. Kim 05/09/2007 11:28 am

Hi Oleg

I installed the new version, but I do not find the option. How is it called?

An other problem:

Could You please have a look at this site: 'www.persil.de'
When downloading it, oee create files with such names:

));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null

));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null@parseInt(_29[0])_3A0;this.minor=_29[1]!=null@parseInt(_29[1])_3A0;this.rev=_29[2]!=null@parseInt(_29[2])_01C318D227

parseInt(_29[0])_3A0;this.minor=_29[1]!=null@parseInt(_29[1])_3A0;this.rev=_29[2]!=null@parseInt(_29[2])_3A0;};deconcept.PlayerVersion.prototype.versi0E763412DF

Shockwave Flash -1;Adobe Acrobat 6;Adobe SVG Viewer;Java Plug-in 1.4;RealPlayer(tm);RealPlayer(tm) G2;RealJukebox IE Plugin;VRML Viewer 2.0;

Tank You and best regards
Jo A. Kim
Jo A. Kim 05/09/2007 11:33 am
>
> Hi Oleg
>
> I installed the new version, but I do not find the option. How is it called?

I found it: ExploreDirs (the new version was not loaded!)
>
> An other problem:
>
> Could You please have a look at this site: 'www.persil.de'
> When downloading it, oee create files with such names:
>
> ));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null
>
> ));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null@parseInt(_29[0])_3A0;this.minor=_29[1]!=null@parseInt(_29[1])_3A0;this.rev=_29[2]!=null@parseInt(_29[2])_01C318D227
>
> parseInt(_29[0])_3A0;this.minor=_29[1]!=null@parseInt(_29[1])_3A0;this.rev=_29[2]!=null@parseInt(_29[2])_3A0;};deconcept.PlayerVersion.prototype.versi0E763412DF
>
> Shockwave Flash -1;Adobe Acrobat 6;Adobe SVG Viewer;Java Plug-in 1.4;RealPlayer(tm);RealPlayer(tm) G2;RealJukebox IE Plugin;VRML Viewer 2.0;
>
> Tank You and best regards
> Jo A. Kim
Oleg Chernavin 05/10/2007 05:36 am
Can you tell me a particular page URL that contains script with such lines?

Oleg.
Oleg Chernavin 05/10/2007 07:08 am
OK. Fixed that.

Oleg.
Jo A. Kim 05/10/2007 08:42 am

Have You a new update?

Jo A. Kim
Oleg Chernavin 05/10/2007 01:09 pm
Here it is:

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

Oleg.
Jo A. Kim 05/10/2007 06:14 pm
Hi Oleg,

Thank You for the new update, but it stills does not work. Downloading the same site oee saves such files:

umentElement.clientHeight){et_iw=document.documentElement.c

Shockwave Flash -1;Adobe Acrobat 6;Adobe SVG Viewer;Java Plug-in 1.4;RealPlayer(tm);RealPlayer(tm) G2;RealJukebox IE Plugin;VRML Viewer 2.0;

QuickTimeCheckObject.QuickTimeCheck.1

this is only a small demonstration. There are a lot of such filenames

Please have a look on it.

Thank You
Best regards
Jo A. Kim

Oleg Chernavin 05/10/2007 08:05 pm
I am afraid, I will be unable to fight all such links. Offline Explorer looks inside scripts for lines that look like URLs. In fact, it is better to load more invalid files than to skip several real ones.

In any case, if there are many invalid files that look the same, I will add code to skip them.

Oleg.
Jo A. Kim 07/27/2007 04:41 am

Hi Oleg,

Do You have a solution fpr this problem?

Now I get a lot of(!) "Access violation at address 00732443 in module 'OE.EXE'. Read of address 6F706D99."

Maybe it could allready be helpfull, if you do not make an error message which must be quited (the user must click the OK-Button), but only put a messsage into the system event log.

In the log file no no entry has been done!

Hope You can help!
best regards
Jo A. Kim


>
> I have also another problem:
> "Access violation at address 0072F8FF in module 'OE.EXE'. Read of address 6D2F3764."
>
> What could it be?
>
> Best regards
> Jo A. kim
Oleg Chernavin 07/27/2007 04:44 pm
I will work to fix this. It looks like the toolbar component fault.

Oleg.
Jo A. Kim 08/08/2007 03:17 am
> I will work to fix this. It looks like the toolbar component fault.
>
> Oleg.

when will You do it?

Jo A. Kim
Jo A. Kim 08/14/2007 05:22 am
> This is easy - start it from the command line:
>
> oe.exe /hWnd=4365866
>
> and this window will get the WM_COPYDATA message. wParam will contain OE window handle, lParam - pointer to the CopyDataStruct. This structure contains text with the data regarding the file.
>
> Oleg.

Hi Oleg,

When downloading a project OEE creats some files named default.htm. Is it possible to notify the creation of this files in the same way like downloaded files (WM_COPYDATA)

Tanks
Jo A. Kim
Oleg Chernavin 08/14/2007 05:32 am
These files are being generated when a URL ends with a slash /. But the notification should be really sent to you. Please try to download http://www.metaproducts.com/ with Level=0 and uncheck Images, User Defined, etc. Would you get notified about that file?

Oleg.
Jo A. Kim 08/14/2007 06:51 am
> These files are being generated when a URL ends with a slash /. But the notification should be really sent to you. Please try to download http://www.metaproducts.com/ with Level=0 and uncheck Images, User Defined, etc. Would you get notified about that file?
>
> Oleg.

I did it and on this page seems to be OK. But when I download http://www.deutschepost.de/ I get no file default.htm. What is wrong?
Oleg Chernavin 08/14/2007 06:55 am
Strange. I make the test and it sends the message for this site. Is it a newly created Project that loads only that URL?

Oleg.
Oleg Chernavin 08/14/2007 04:42 pm
I think, I have an idea on what is wrong there. I will check some more and get back.

Oleg.
Jo A. Kim 08/16/2007 08:44 am
> Strange. I make the test and it sends the message for this site. Is it a newly created Project that loads only that URL?
>
> Oleg.

Yes there is no one url more!

Oleg do You have an idea how to load and display(!!!) the flash on this site: http://www.vfb-stuttgart.de/de/

Tanks
Jo A. Kim
Oleg Chernavin 08/16/2007 09:53 am
Please try to use AutoSave. If it will not help either, let me know.

Oleg.
Jo A. Kim 08/16/2007 10:43 am
> Please try to use AutoSave. If it will not help either, let me know.
>
> Oleg.

I already used autosave without success!

Jo A. kim
Oleg Chernavin 08/16/2007 11:05 am
I tried various ways, but so far I have no ideas either. Sorry.

Oleg.
Oleg Chernavin 08/28/2007 08:31 am
Sorry for the toolbar issues. We are still working on it.

Oleg.