Community discussion forum
Virtual Drive
-
This thread is for discussions of Virtual Drive.
-
Advertisement
Simply the fastest line-level profiler for .NET ever
“The low overhead means it has minimal impact on the execution of my program”
Mark Everest, Development Team Leader, Renault F1 Team Ltd.Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now
-
It really works!
And fast too!! -
Be very careful using the SUBST command on WinNT/2000/XP, it is dangerous. NTFS permissions can conflict with each other say drive F: is actually a drive created from a subdir of Drive C:, applying NTFS permissions to drive C: that conflict with drive F: can cause NTFS corruption. You may find yourself logged in as Admin and no longer able to access files or whole directories due to the corruption. Microsoft has acknowledged this and suggests against the usgae of SUBST on WinNT based machines. Win9x/ME does not have this issue due to lack of NTFS.
-
But here's a much cleaner method...
Option Explicit
Private Const DDDREMOVEDEFINITION As Long = &H2
Private Declare Function DefineDosDevice Lib "kernel32" Alias "DefineDosDeviceA" (ByVal dwFlags As Long, ByVal lpDeviceName As String, Optional ByVal lpTargetPath As String = vbNullString) As Long
Public Function Subst(ByVal Drive As String, ByVal Path As String) As Boolean
Subst = CBool(DefineDosDevice(0, Drive, Path))
End Function
Public Function UnSubst(ByVal Drive As String) As Boolean
UnSubst = CBool(DefineDosDevice(DDDREMOVEDEFINITION, Drive))
End Function
...and an example...
If Not Subst("P:", "C:\My Documents\Shameless Porn") Then MsgBox Err.LastDLLError
...and, subsequently....
If Not UnSubst("P:") Then MsgBox Err.LastDLLError
... Groovy, no? -
OK..nice code.. but how about this..can anybody help e to solve this problems.
-->i'm planning to create the virtual drive in windows 2000 and map some webserver folder or ftp folders to that
drive and allow client to work as his physical drive..
--> pls Help me as soon as possible
-
I have XP with my primary drive NTFS but I intend to use this program for an external FAT32 drive. Will I still risk NTFS corruption, or am I safe with the FAT32?
-
Sorry for being a bit of a thick. Please can tell me how you got the code to work. I'm using VB 2005 express edition, and have managed to build and execute the code. But all I get is a virtual hard drive. I don't see how the code in the module gets called. Its the same as if I use subst from the command line.
Regards ianp
-
Hey syed..
I have same problem....
I also want to map virtual drive in windows 2000 to some webserver folder or ftp folders and allow client to work as his physical drive..
can any body help this out?
I have already made a mapping by asp.net but it is just working in internet explorer window..
Thanks in advance
-
Hey Friends,
I want to develop a virtual storage drive project in .Net. but confused about howto start?
I have alerady created a web drive solution which working using WebDav protocol,but it uses Iexplorer to display files and folders.
Whereas i want to display the folders and files in Windows explorer (Somethingexactly like What Gdrive software does)
I want to something like this..
Once i input "https://<server address>", "User Name", "Password". I want to getthe all of my folders and files from taht server folder should be displayed in
windows explorer
Can anyone help me to distingush the webdrive and virtual windows drive?
Please post the articles or sourcecode related to this topic..Thanks in advance
-
Hi,
I have the same problem, so do you have any idea for make that? -
Hello,
I have the same problem. have you found a solution?
Cheers,
Roeland
Post a reply
Quick links
Recent activity
- manjunath L replied to Regarding Visual Basic Programme
- gangireddysaritha replied to i have struck with my proj...
- Stefano Sloop replied to The buzz of economic activity
- jack semwal replied to i have struck with my proj...
- Larry Bargers replied to Error 4 Make sure that the ...
- Ashok Singh replied to How to receive data in web ...
Enter your message below
Sign in or Join us (it's free).