?
Solved

Problems with the Windows IShell

Posted on 1997-06-14
3
Medium Priority
?
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Author Comment

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

Accepted Solution

by:
sperling earned 300 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

718 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