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
Solved

Problems with the Windows IShell

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
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…

829 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