Solved

Problems with the Windows IShell

Posted on 1997-06-14
3
169 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
Comment Utility
Edited text of question
0
 
LVL 3

Accepted Solution

by:
sperling earned 100 total points
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now