Solved

Problems with the Windows IShell

Posted on 1997-06-14
3
175 Views
Last Modified: 2010-04-04
Hi there!

I am student at a technical colleage in Switzerland. Together with my
classmate I am working on a mini project. We are programming a Win95
software to transfer files via serial link to another pc. The whole
thing is programed in Delphi 2.

At the moment we are programming a Explorer like user-interface. But
when doing a sertain actions the program breaks down. The error can be
reproduced by pressing 2 times the F5-Key. This key should update the
TreeView object. The first time it works without any problems. But the
second time some pointers point into the desert. We have been debugging
the program for a week now but we cannot make out the error.

I know that nobody likes dubugging errors in foreign software but we
would appreciate it very much if someone could have a short look at
the encolsed program.

You can find the source code on http://www.twi.ch/~e4monsch/speedlnk.zip

Thank you very much for your help.

Ian

0
Comment
Question by:e4monsch
  • 2
3 Comments
 
LVL 2

Author Comment

by:e4monsch
ID: 1337033
Edited text of question
0
 
LVL 3

Accepted Solution

by:
sperling earned 100 total points
ID: 1337034
In TSLink.TreeLocalDelete you release the ShellFolder if assigned. Desktop, the ShellFolder of node 0, is released here on the first refresh. Good luck keeps the actual shell object in memory for a while, but eventually the data pointed to by Desktop is overwritten by some other data. Then, you get an exception in TSLink.EnumFolder when calling ShellFolder.EnumObjects using the released Desktop (= ShellFolder of node 0)

Fix by one of three possibilities:

1) Do not release the ShellFolder of node 0 in TSLink.TreeLocalDeelete

2) Use an Desktop.AddRef in ResetAll before using it for node 0

3) Recreate the Desktop in ResetAll before using it for node 0


Regards,

Erik.
0
 
LVL 2

Author Comment

by:e4monsch
ID: 1337035
We'll check it. Probably you're right. My classmate has
reimplemented the whole thing. Now the error doesn't appear
any more. He said that he is keeping the Desktop and doesn't
remove it anymore.

Thank you for your help
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question