I am not the original author of this software project and the code is poorly documented. I am mainly a Java/C++ developer.

The program displays the tree structure and allows files and folder to be selected. The program is getting errors with FileSystemTreeView when trying to return nodes on a system with a reserved partition.

Here is what is happening:

tree.SelectedNode = tree.Nodes(0) 'returns error with system reserved partition.

calling, GetDriveList() will properly return all the drive letters - and not throw an error.

Only when trying to get a tree.Node() or tree.load() is the error occurring.

Is anyone aware of this issue? Is there a solution? Is there a better/different way of returning and displaying the directory structure?

What exactly you want to do?, the code posted is to select the first node in the TreeView.

What is the program aiming to do with the treeview?

The software will basically be copying files/folders from a source to one or more destination locations.

From what I can tell the treeview is used to keep track of the file system/structure for use with the copying. So, in the first screen you would select source files from a treeview structure, the next screen would list destination options (network drives, external hdd, usb drives, etc...).

The program crashes when the previously attached line of code is executed (on specific systems). The only difference I can see so far is that the systems it crashes on have system reserved partitions.

Let me know if you have more questions. Thanks for taking the time to read my post.

Umm, im thinkin about that.

Maybe you need to modify the code where the Drives are added to the Treeview control, so you can delimit what class of drives are filled n the Treeview.

I hope the next links helps you to solve this:


Possible DriveType's are shown here:

Make another solution and check the specific type for the reserved partitions, this way you can limit which partitions are added to the control and avoid that problem.
If you get the answer with that links let me know, I'm pretty interested in this problem.

This article has been dead for over six months. Start a new discussion instead.