Solved

Problems with the Windows IShell

Posted on 1997-06-14
3
177 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 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 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