?
Solved

Need API function for Local system folder details

Posted on 2001-08-21
7
Medium Priority
?
351 Views
Last Modified: 2012-06-27
Hi Experts
Is there any API function which will show dialog box which contains
only the local drive only, not even mapped drive ?
I tried with SHBrowseForFolder but then it is allowing me to select
the mapped drive.
Awiting for your reply
0
Comment
Question by:rakesh_manohar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 1

Expert Comment

by:Vinda
ID: 6409769
Try the FolderTreeView control (its freeware, i guess) developed by CCRP (http://www.mvps.org/ccrp). That control has the same behavior.

0
 
LVL 1

Accepted Solution

by:
Madmarlin earned 150 total points
ID: 6410106
Try the fso (File System Object) in VB.
Its amazing and I beleive will give you what you want, along with tons of cool functions that allows you to quickly retreive such information.

Cant actually remember what its referenced as but shouldn;t be too hard to find out.
The fso is basically a wrapper for loads of different API calls relating to your system structure and files..

Madmarlin
0
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6410259
This is a bit of a work around but will restrict selection to your local machine.

Before the call to SHBrowseForFolder
Store the current valid folder in a variable.
After your call to SHBrowseForFolder
Check that the folder is a local folder with the following:

If GetDriveType(strFolderName) <> 2 then
    'Call SHBrowseForFolder again or popup a message box
End If

The code to check the drive type is:

Public Function GetDriveType(strFolderName as String) as Integer

    Dim fs,drive
    On Error Resume Next
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set drive = fs.GetDrive(fs.GetDriveName(strFolderName))
    GetDriveType = drive.DriveType
    Set drive = Nothing
    Set fs = Nothing

End Function

Vin.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:wsh2
ID: 6410502
rakesh_manohar Question History:

Questions Asked 13
Last 10 Grades Given A B A  
Question Grading Record 3 Answers Graded / 3 Answers Received

TEN Open Questions dating back to March of this year.

rakesh_manohar - PLEASE maintian YOUR other Questions with a comment, grade, or deletion before proceeding here.


0
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6410513
wsh2
can you post the url's for the open questions I seem to remember this guy.

Vin.
0
 
LVL 14

Expert Comment

by:wsh2
ID: 6410557
VincentLawlor:

Click on the "1.comment or answer for akesh_manohar" perlink at the bottom / top of this question -or- htp://www.experts-exchange.com/jsp/memberProfile.jsp?mbr=rakesh_manohar

and then click on the View Question history button.
0
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6412562
wsh2 >> Cheers

Vin.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

800 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