Solved

Virtual/Network Drives

Posted on 2003-11-01
6
254 Views
Last Modified: 2013-11-15
I can't figure out how someone can emulate a drive under 'My Computer'. I want to create a program-driven virtual drive similar to external Zip drives or programs like WebDrive which allows you to create network drives pointed at FTP servers. Does anybody know how to set up something similar with a Visual Basic program?
0
Comment
Question by:CYBER_Aeon
6 Comments
 

Accepted Solution

by:
Miesepies earned 100 total points
Comment Utility
My guess is no...you can't. If I'm not mistaken, you need to write a device driver to emulate a drive. And device drivers are written in C & assembly.

It is possible to write a name extension (a 'virtual directory' visible in Windows Explorer) in VB though... However, don't get your hopes up, since its rather complicated, and you need a few hacks here and there to get it up and running in VB6. If you are really interested, check out Visual Basic Shell Programming by J.P. Hamilton (http://www.oreilly.com/catalog/vbshell).

Michel
0
 
LVL 5

Assisted Solution

by:fantasy1001
fantasy1001 earned 100 total points
Comment Utility
0
 
LVL 1

Expert Comment

by:mahesh_mp
Comment Utility
hello CYBER_Aeon
This is simple api code where you can get  the virutal drives

Private Type MSGBOXPARAMS
    cbSize As Long
    hwndOwner As Long
    hInstance As Long
    lpszText As String
    lpszCaption As String
    dwStyle As Long
    lpszIcon As String
    dwContextHelpId As Long
    lpfnMsgBoxCallback As Long
    dwLanguageId As Long
End Type

Private Declare Function GetLogicalDrives Lib "kernel32" () As Long

Private Sub Form_Paint()
    'KPD-Team 1999,2001
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    Dim MBP As MSGBOXPARAMS, LDs As Long, Cnt As Long, sDrives As String
    'get the available drives
    LDs = GetLogicalDrives
    sDrives = "Available drives:" & vbCrLf
    For Cnt = 0 To 25
        If (LDs And 2 ^ Cnt) <> 0 Then
            sDrives = sDrives + "  " + Chr$(65 + Cnt) & " :\" & vbCrLf
        End If
    Next Cnt
    Print sDrives

End Sub
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now