Solved

Virtual/Network Drives

Posted on 2003-11-01
6
257 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
ID: 9666565
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
ID: 9668168
0
 
LVL 1

Expert Comment

by:mahesh_mp
ID: 9670136
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

810 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