473,796 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why no drive object?

dgk
Having searched far and wide in the net classes, and then having
searched far and wide in this newsgroup, it is obvious that there is
no Drive object. We have io.directory objects and a GetLogicalDrive s
method, but no way to manipulate the drives returned by
GetLogicalDrive s except for Management objects. Logically, shouldn't a
drive object just be part of System.IO? I really don't want to use the
FSO stuff.

This is lots of work just to duplicate the functionality of a
drivebox. Well, I'm sure MS had a good reason do make it so indirect.
Does anyone know what that reason is?
Nov 20 '05 #1
5 1114
"dgk" <so*********@ze ro-spam-hotmail.com> schrieb
Having searched far and wide in the net classes, and then having
searched far and wide in this newsgroup, it is obvious that there
is no Drive object. We have io.directory objects and a
GetLogicalDrive s method, but no way to manipulate the drives returned
by GetLogicalDrive s except for Management objects. Logically,
shouldn't a drive object just be part of System.IO? I really don't
want to use the FSO stuff.

This is lots of work just to duplicate the functionality of a
drivebox. Well, I'm sure MS had a good reason do make it so
indirect. Does anyone know what that reason is?


I think the question is not related to the VB.NET language. Please post to
one of the Framework groups (microsoft.publ ic.framework[.*]).
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
* dgk <so*********@ze ro-spam-hotmail.com> scripsit:
Having searched far and wide in the net classes, and then having
searched far and wide in this newsgroup, it is obvious that there is
no Drive object.


As Armin says, that's not the right place for the question.

In .NET 2.0, there will be a 'DriveInfo' class:

<http://longhorn.msdn.m icrosoft.com/lhsdk/ref/ns/system.io/c/driveinfo/driveinfo.aspx>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
dgk
On 27 Dec 2003 00:06:53 +0100, hi************* **@gmx.at (Herfried K.
Wagner [MVP]) wrote:
* dgk <so*********@ze ro-spam-hotmail.com> scripsit:
Having searched far and wide in the net classes, and then having
searched far and wide in this newsgroup, it is obvious that there is
no Drive object.


As Armin says, that's not the right place for the question.

In .NET 2.0, there will be a 'DriveInfo' class:

<http://longhorn.msdn.m icrosoft.com/lhsdk/ref/ns/system.io/c/driveinfo/driveinfo.aspx>


Ok. Looks like something they just didn't have time to finish.
Nov 20 '05 #4
* dgk <so************ ******@zero-spam-hotmail.com> scripsit:
Having searched far and wide in the net classes, and then having
searched far and wide in this newsgroup, it is obvious that there is
no Drive object.


As Armin says, that's not the right place for the question.

In .NET 2.0, there will be a 'DriveInfo' class:

<http://longhorn.msdn.m icrosoft.com/lhsdk/ref/ns/system.io/c/driveinfo/driveinfo.aspx>


Ok. Looks like something they just didn't have time to finish.


ACK. Have a look at the complete class tree, a lot of new classes will
be added which were missing since .NET 1.0.

;-)

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
dgk
On 27 Dec 2003 13:34:58 +0100, hi************* **@gmx.at (Herfried K.
Wagner [MVP]) wrote:
* dgk <so************ ******@zero-spam-hotmail.com> scripsit:
Having searched far and wide in the net classes, and then having
searched far and wide in this newsgroup, it is obvious that there is
no Drive object.

As Armin says, that's not the right place for the question.

In .NET 2.0, there will be a 'DriveInfo' class:

<http://longhorn.msdn.m icrosoft.com/lhsdk/ref/ns/system.io/c/driveinfo/driveinfo.aspx>


Ok. Looks like something they just didn't have time to finish.


ACK. Have a look at the complete class tree, a lot of new classes will
be added which were missing since .NET 1.0.

;-)


Just one more thing then. The example in the MSDN library for
Freespace uses FSO and I don't want to. I swiped some of this code
from a previous post of yours and I just cannot figure out how to drop
the drive name or volume or any other property into a listbox. Can you
please tell me what I'm doing wrong? The 1 to Length-1 is intentional,
I'm skipping A: because I didn't want to start off with a removable
drive just in case that was a problem. As is, I'm getting an Invalid
Class error for each drive. I've tried a hundred permutations of this
code.

For i = 1 To Drives.Length - 1
DriveL = "Win32_LogicalD isc.DeviceID=" & Chr(34) &
Drives(i).Subst ring(0, 2) & Chr(34)
'DriveL = "Win32_LogicalD isc.DeviceID="" C:" & """"
Dim Mydisk As New System.manageme nt.ManagementOb ject(DriveL)
MessageBox.Show ("Testing " & Mydisk.Path.ToS tring) ' this is
just returning DriveL, which is a string. But no error.
Dim diskProperty As System.Manageme nt.PropertyData
Try
ListBox1.Items. Add(Mydisk.Prop erties("FreeSpa ce").ToString )
'For Each diskProperty In Mydisk.Properti es
' ListBox1.Items. Add(diskPropert y.Name)
' 'ListBox1.Items .Add(diskProper ty.Value)
'Next
' ListBox1.Items. Add(Mydisk.Prop erties("Name"))
Catch ex As System.Exceptio n
MsgBox("Error is " & ex.Message)
End Try
Next
Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4199
by: Ken Varn | last post by:
Everytime I call Process.GetCurrentProcess() the system goes out to the floppy drive. Why does this happen. I decided to use FileMon to get a log of what is happening when this occurs. Here is the log: 1 4:31:10 PM BlockedConfigAp:1340 IRP_MJ_CREATE A: DASD SUCCESS Attributes: Any Options: Open 2 4:31:11 PM BlockedConfigAp:1340 IRP_MJ_DEVICE_CONTROL A: DASD INVALID DEVICE REQUEST IOCTL: 0x560000 3 4:31:11 PM BlockedConfigAp:1340...
3
3657
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore my settings if my profile became tampered with or corrupt. Is there any sample code available out there? -Robert
7
1915
by: GregT | last post by:
I program in C#. Is there a way to determine which of the local machine's logical drives are associated with CD drive(s)?
7
19628
by: Eric.Jones | last post by:
I've encountered a strange error with loading delimited files from a Samba (SMB) network drive, has anyone else seen this before? (Platform: WinXP Pro, UDB PE 8015, level 02060106, SAMPLE db) db2 load from M:\org1.del of del replace into org SQL3109N The utility is beginning to load data from file "M:\org1.del". SQL2036N The path for the file or device "M:\org1.del" is not valid. db2diag.log:
1
2275
by: Iwan | last post by:
I have a speciffic task of which i do not know how to start on. The task is to create a virtual drive (like a ram drive og deamon tools). Through this drive files are to be saved and loaded like a normal drive, but the "files" are created runtime by my program. The idea is that the program accessing the drive can not tell the diffrence. Here is what i need: - How to register the drive with windows. - How to create a connection between...
0
1733
by: petro | last post by:
I am trying to deploy an asp.net application to my web server. My application uses system.data.oledb to connect to an oracle database. On my development machine I have the oracle client 10g installed and my application works. But on the Web server I get the error below. I believe it is because the Oracle client was not installed on the web server. The web server has two drives, our techs installed the oracle client on one drive and my...
14
2327
by: frostalicious | last post by:
Used VB.NET (on my client PC) to convert VB6 executable to .NET executable. Placed the .exe file on a network drive on my server. From client, ran .NET Wizards "Trust an Assembly" to make the .exe (on the network drive, on the server) "Full Trust." From the client, double-click on the ..exe (on the network drive, on the server) and it runs fine. So far, so good, but... On the server, where I've installed not VB.NET but .NET
4
2013
by: robert d via AccessMonster.com | last post by:
When my app starts up, it creates a temporary database. This temp database is created from a 'model' database that is in the same folder as the application. Because there is a model, the creation is essentially to just copy the 'model' database and give it the name of the application with the extension ".tmp". Then code opens the temp database and links to the tables. This has always worked flawlessly until today. Today, I needed to...
1
5595
by: Steve Marshall | last post by:
Hi All, Apologies if this has come up before, but how can I set up something that will notify me when a removeable drive (like a USB drive or CompactFlash card) is inserted into its slot? Ideally I would like some sort of event that would call my code when it happens. The FileSystemWatcher object doesn't seem able to do this, unless I am missing something. Thanks
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9535
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10242
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.