Community discussion forum

Virtual Drive

This is a comment thread discussing Virtual Drive
  • 9 years ago

    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

  • 5 years ago

    It really works!
    And fast too!!

  • 5 years ago

    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.

  • 5 years ago

    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?

  • 4 years ago

    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

  • 2 years ago

    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?

  • 2 years ago

    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

  • 1 year ago

    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

     

  • 1 year ago

    Hey Friends,
    I want to develop a virtual storage drive project in .Net. but confused about how

    to 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 (Something

    exactly like What Gdrive software does)

    I want to something like this..
    Once i input "https://<server address>", "User Name", "Password". I want to get

    the 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

  • 1 year ago

    Hi,

    I have the same problem, so do you have any idea for make that?



  • 1 year ago

    Hello,

    I have the same problem. have you found a solution?

    Cheers,

    Roeland

Post a reply

Enter your message below

Sign in or Join us (it's free).