Question

How to "DIR" a network resource for shares?

Asked by: Advanced_Tech

Say for instance, I want to create my own flavor of drive mapping utility with browser integrated into my application.

Instead of going to network neighborhood, I would much rather want it to be able to just type the network computer name and have it show me the shares from which to click on to then map as the selected drive letter.

Does anyone have the API or other Function Declaration/Call for setting this up?  Ideally I suppose I also need the code for doing the DIR of the network neighborhood so in the event they dont know the name of the server they could browse it but I could really just invoke the "map by dialog" if they dont know the name but it would also be nice if you know how to do that as well :)

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
1999-07-11 at 19:53:10ID10181299
Tags

network

Topic

Visual Basic Programming

Participating Experts
2
Points
50
Comments
12

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. WINS workgroup machines invisible in Network Neighborhood
    I have a problem with my Network Neighborhood. When I click on it it searches for all the computers currently running in my workgroup, but than shows only some of them, not all. I can't even see myself. If I go by search/computer I CAN find a specific computer and than explor...
  2. API
    how can i do an API program under windows using C.. so i would be able to play wav sounds and insert graphics..
  3. Browsing Network Neighborhood
    OK, I have had more trouble getting this done than I had expected. Here is what I want to do: Be able to browse the network neighborhood programmatically, one level at a time. For example, I would list all of the top level workgroups/computers. If the user clicked on one ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: Advanced_TechPosted on 1999-07-11 at 19:55:24ID: 1523611

Edited text of question.

 

by: MirkwoodPosted on 1999-07-12 at 00:07:25ID: 1523612

This will do it.
http://www.mvps.org/ccrp/controls/ccrpbdsvr.htm

+

Option Explicit

Private Declare Function WNetAddConnection Lib "mpr.dll" Alias "WNetAddConnectionA" (ByVal lpszNetPath As String, ByVal lpszPassword As String, ByVal lpszLocalName As String) As Long
Private Declare Function WNetCancelConnection Lib "mpr.dll" Alias "WNetCancelConnectionA" (ByVal lpszName As String, ByVal bForce As Long) As Long

Const WN_Success = &H0
Const WN_Not_Supported = &H1
Const WN_Net_Error = &H2
Const WN_Bad_Pointer = &H4
Const WN_Bad_NetName = &H32
Const WN_Bad_Password = &H6
Const WN_Bad_Localname = &H33
Const WN_Access_Denied = &H7
Const WN_Out_Of_Memory = &HB
Const WN_Already_Connected = &H34

'-- Error number and message
Public ErrorNum         As Long
Public ErrorMsg         As String

Public rc               As Long

Private Const ERROR_NO_CONNECTION = 8
Private Const ERROR_NO_DISCONNECT = 9


Private Type NETRESOURCE
   dwScope        As Long
   dwType         As Long
   dwDisplayType  As Long
   dwUsage        As Long
   lpLocalName    As String
   lpRemoteName   As String
   lpComment      As String
   lpProvider     As String
End Type

'----------------------------------------------
'WNetAddConnection2

'Allows the caller to redirect (connect) a local
'device to a network resource. It is similar to
'WNetAddConnection, except that it takes a pointer
'to a NETRESOURCE structure to describe the network
'resource to connect to. It also takes the addition
'parameters lpUserID and dwFlags.

'lpNetResource
'Specifies the network resource to connect to.
'The following fields must be set when making a
'connection, the others are ignored.

'  lpRemoteName: Specifies the network resource
'                to connect to. This is limited
'                to MAX_PATH.
 
'  lpLocalName: This specifies the name of a local
'               device to be redirected, such as "F:"
'               or "LPT1". The string is treated in a
'               case insensitive manner, and may be
'               the empty string (or NULL) in which
'               case a connection to the network resource
'               is made without making a redirection.
 
'  lpProvider: Specifies the NP to connect to. If NULL
'              or empty string, Windows will try each
'              NP in turn. The caller should set
'              lpProvider only if it knows for sure
'              which network it wants. Otherwise, it
'              is preferable to let Windows determine
'              which NP the network name maps to.
'              If this is non NULL, Windows will try
'              the named NP and no other.
 
'  dwType: Specifies the type of resource to connect to.
'          It must be RESOURCETYPE_DISK or RESOURCETYPE_PRINT
'          if lpLocalName is not the empty string. It may
'          also be RESOURCETYPE_ANY if lpLocalName is the
'          empty string.
 
'lpPassword
'Specifies the password to be used in making the
'connection, normally the password associated with
'lpUserID. A NULL value or string may be passed in
'to indicate to the function to use the current
'default password.
'
'lpUserID
'This specifies the identity of the user needed to
'make the connection. If NULL, a default will be
'applied. This is used when the user wishes to connect
'to a resource, but has a different user name or
'account assigned to him for that resource. This
'identification represents a security context, and
'is NP specific.
'
'dwFlags
'This is a bit mask which may have any of the
'following bits set:
'
'  CONNECT_UPDATE_PROFILE: If the connection should
'                          be made persistent. If set,
'                          Windows automatically restores
'                          this connection when the user
'                          logs on to the network. A connection
'                          is only made persistent if the
'                          connection was successful.
Private Declare Function WNetAddConnection2 Lib "mpr.dll" Alias "WNetAddConnection2A" (lpNetResource As NETRESOURCE, ByVal lpPassword As String, ByVal lpUserName As String, ByVal dwFlags As Long) As Long
Private Declare Function WNetCancelConnection2 Lib "mpr.dll" Alias "WNetCancelConnection2A" (ByVal lpName As String, ByVal dwFlags As Long, ByVal fForce As Long) As Long
Private Declare Function WNetConnectionDialog Lib "mpr.dll" (ByVal hWnd As Long, ByVal dwType As Long) As Long
Private Declare Function WNetDisconnectDialog Lib "mpr.dll" (ByVal hWnd As Long, ByVal dwType As Long) As Long

'Public Const RESOURCE_CONNECTED = &H1
'Public Const RESOURCE_REMEMBERED = &H3
'Public Const RESOURCEDISPLAYTYPE_DOMAIN = &H1
'Public Const RESOURCEDISPLAYTYPE_GENERIC = &H0
'Public Const RESOURCEDISPLAYTYPE_SERVER = &H2
'Public Const RESOURCEUSAGE_CONTAINER = &H2

Const NO_ERROR = 0
Const CONNECT_UPDATE_PROFILE = &H1
Const RESOURCETYPE_DISK = &H1
Const RESOURCETYPE_PRINT = &H2
Const RESOURCETYPE_ANY = &H0
Const RESOURCE_GLOBALNET = &H2
Const RESOURCEDISPLAYTYPE_SHARE = &H3
Const RESOURCEUSAGE_CONNECTABLE = &H1

Public Sub Connect(sDrive As String, sService As String, Optional sPassword As String = "")

   On Error GoTo Err_Connect
   Me.ErrorNum = 0
   Me.ErrorMsg = ""
   rc = WNetAddConnection(sService & Chr(0), sPassword & Chr(0), sDrive & Chr(0))
   If rc <> 0 Then GoTo Err_Connect

   Exit Sub

Err_Connect:
   Me.ErrorNum = rc
   Me.ErrorMsg = WnetError(rc)

End Sub

Public Sub DisConnect(sDrive As String)

   On Error GoTo Err_DisConnect
   Me.ErrorNum = 0
   Me.ErrorMsg = ""
   rc = WNetCancelConnection(sDrive + Chr(0), 0)
   If rc <> 0 Then GoTo Err_DisConnect

   Exit Sub
Err_DisConnect:
   Me.ErrorNum = rc
   Me.ErrorMsg = WnetError(rc)

End Sub

Private Function WnetError(Errcode As Long) As String

   Select Case Errcode
      Case WN_Not_Supported:
         WnetError = "Function is not supported."
      Case WN_Out_Of_Memory:
         WnetError = "Out of Memory."
      Case WN_Net_Error:
         WnetError = "An error occurred on the network."
      Case WN_Bad_Pointer:
         WnetError = "The Pointer was Invalid."
      Case WN_Bad_NetName:
         WnetError = "Invalid Network Resource Name."
      Case WN_Bad_Password:
         WnetError = "The Password was Invalid."
      Case WN_Bad_Localname:
         WnetError = "The local device name was invalid."
      Case WN_Access_Denied:
         WnetError = "A security violation occurred."
      Case WN_Already_Connected:
         WnetError = "The local device was connected to a remote resource."
      Case Else:
         WnetError = "Unrecognized Error " + Str(Errcode) + "."
   End Select

End Function

Public Function ConnectNetworkDialog() As Long
   ' *** Show the dialog to map a drive
   
   'If the function succeeds, the return value is
   'NO_ERROR (0). If the user cancels out of the
   'dialog box, it is &HFFFFFFFF.
   
   ConnectNetworkDialog = WNetConnectionDialog(0&, RESOURCETYPE_DISK)

End Function

Public Function DisconnectNetworkDialog() As Long
   ' *** Show the dialog to disconnect mapped a drive
   
   'If the function succeeds, the return value is
   'NO_ERROR (0). If the user cancels out of the
   'dialog box, it is &HFFFFFFFF.
   
   DisconnectNetworkDialog = WNetDisconnectDialog(0&, RESOURCETYPE_DISK)

End Function

Public Function ConnectPrintDialog() As Long
   ' *** Show the dialog to map a network printer, Windows
   
   'If the function succeeds, the return value is
   'NO_ERROR (0). If the user cancels out of the
   'dialog box, it is &HFFFFFFFF.
   
   ConnectPrintDialog = WNetConnectionDialog(0&, RESOURCETYPE_PRINT)

End Function

Public Function DisconnectPrintDialog() As Long
   ' *** Show the dialog to disconnect network printer
   
   'If the function succeeds, the return value is
   'NO_ERROR (0). If the user cancels out of the
   'dialog box, it is &HFFFFFFFF.
   
   DisconnectPrintDialog = WNetDisconnectDialog(0&, RESOURCETYPE_PRINT)

End Function

Public Function ConnectUserPassword(sDrive As String, sService As String, Optional sUser As String = "", Optional sPassword As String = "") As Boolean
   ' *** Connect to a network drive
   
   'attempts to connect to the passed network
   'connection to the specified drive.
   'ErrInfo=NO_ERROR if successful.
   
   Dim NETR       As NETRESOURCE
   Dim errInfo    As Long
   
   With NETR
      .dwScope = RESOURCE_GLOBALNET
      .dwType = RESOURCETYPE_DISK
      .dwDisplayType = RESOURCEDISPLAYTYPE_SHARE
      .dwUsage = RESOURCEUSAGE_CONNECTABLE
      .lpRemoteName = sDrive
      .lpLocalName = sService
   End With
   
   errInfo = WNetAddConnection2(NETR, sPassword, sUser, CONNECT_UPDATE_PROFILE)
   
   ConnectUserPassword = errInfo = NO_ERROR
   
End Function


 
 
 
   
 

 

by: MirkwoodPosted on 1999-07-12 at 00:08:55ID: 1523613

http://support.microsoft.com/support/kb/articles/q189/5/15.asp

Create a new module, put those declares in it:
'Type definition
Public Type SHITEMID    'Browse Dialog
       cb As Long
       abID As Byte
End Type

Public Type ITEMIDLIST  'Browse Dialog
       mkid As SHITEMID
End Type

Public Type BROWSEINFO  'Browse Dialog
       hOwner As Long
       pidlRoot As Long
       pszDisplayName As String
       lpszTitle As String
       ulFlags As Long
       lpfn As Long
       lParam As Long
       iImage As Long
End Type
Public Const BIF_RETURNONLYFSDIRS = &H1 'Browse Dialog
Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long
Declare Function SHBrowseForFolder Lib "shell32.dll" Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long

'PURPOSE:   Displays a dialog that allows the user to select a directory from a tree
'ARGUMENTS:
'   IN szPrompt:        Prompt to display
'RETURNS:   The path selected, or "" if cancel was selected
Public Function BrowseForFolder(szPrompt As String) As String
       Dim bi As BROWSEINFO
       Dim pidl As Long
       Dim nRet As Long
       Dim szPath As String
       
       szPath = Space$(512)
       
       'Fill struct
       bi.hOwner = 0&
       bi.pidlRoot = 0&
       bi.lpszTitle = szPrompt
       bi.ulFlags = BIF_RETURNONLYFSDIRS
       
       'Display the dialog and get the selected path
       pidl& = SHBrowseForFolder(bi)
       SHGetPathFromIDList ByVal pidl&, ByVal szPath
       
       'Return value
       BrowseForFolder = Trim$(szPath)
End Function

 

by: MirkwoodPosted on 1999-07-12 at 00:09:31ID: 1523614

Here is a complete code.
Create a new exe project with a form and one CommandButton.
Add a reference to "Microsoft Internet Control" (shdocvw.dll).


Option Explicit

Private Const BIF_BROWSEFORCOMPUTER = &H1000
     
Const WSADESCRIPTION_LEN = 256 + 1
Const WSASYS_STATUS_LEN = 128 + 1
Const AF_INET = 2
Const INADDR_NONE = &HFFFFFFFF

Private Type WSADATA
    wHighVersion As Long
    szDescription As String * WSADESCRIPTION_LEN
    szSystemStatus As String * WSASYS_STATUS_LEN
    iMaxSockets As Long
    iMaxUdpDg As Long
    lpVendorInfo As Long
End Type

Private Type HOSTENT
    h_name As Long 'LPSTR
    h_aliases As Long 'LPLPSTR
    h_addrtype As Integer
    h_length As Integer
    h_addr_list As Long 'char FAR * FAR * h_addr_list
End Type
         
Private Type IN_ADDR
    b1 As Byte
    b2 As Byte
    b3 As Byte
    b4 As Byte
End Type
                 
Private Declare Function WSAStartup Lib "Wsock32.dll" (ByVal wVersionRequested As Integer, ByRef lpWSAData As WSADATA) As Long
Private Declare Sub WSACleanup Lib "Wsock32.dll" ()
Private Declare Function gethostbyaddr Lib "Wsock32.dll" (addr As Any, ByVal ilen As Long, ByVal itype As Long) As Long
Private Declare Function inet_addr Lib "Wsock32.dll" (ByVal cp As String) As Long
Private Declare Function gethostbyname Lib "Wsock32.dll" (ByVal name As String) As Long 'HOSTENT

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As Long) As Long
Private Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpString1 As String, lpString2 As Any) As Long

Public Function GetName(cpAddr As String) As String
     
    Dim Adata As WSADATA
    Dim addr As Long
    Dim p As Long
    Dim host As HOSTENT
    Dim buf As String
     
    GetName = ""
     
    If WSAStartup(&H101, Adata) <> 0 Then Exit Function
     
    addr = inet_addr(cpAddr)
    If addr <> INADDR_NONE Then
     
        'switch address
        addr = ((addr And &HFF&) * &H1000000) _
            + ((addr And &HFF000000) / &H1000000) _
            + ((addr And &HFF00&) * &H100) _
            + ((addr And &HFF0000) / &H100)
         
        p = gethostbyaddr(ByVal VarPtr(addr), 4, AF_INET)
         
        If p Then
            CopyMemory ByVal VarPtr(host), ByVal p, LenB(host)
            buf = Space(lstrlen(host.h_name))
            lstrcpy buf, ByVal host.h_name
            GetName = Trim(Left(buf, lstrlen(host.h_name)))
        End If
    End If
     
    WSACleanup

End Function

Public Function GetIPaddress(sName As String) As String
     
    Dim Adata As WSADATA
    Dim a As IN_ADDR
    Dim host As HOSTENT
    Dim p As Long
     
    GetIPaddress = ""
     
    If WSAStartup(&H101, Adata) <> 0 Then Exit Function
     
    p = gethostbyname(sName)
     
    If p Then
        CopyMemory ByVal VarPtr(host), ByVal p, LenB(host)
         
        'p = host.h_addr_list[0]
        CopyMemory ByVal VarPtr(p), ByVal host.h_addr_list, LenB(p)
         
        If p Then
            'a = *p
            CopyMemory ByVal VarPtr(a), ByVal p, LenB(a)
             
            GetIPaddress = a.b1 & "." & a.b2 & "." & a.b3 & "." & a.b4
        End If
    End If
     
    WSACleanup

End Function

Private Sub Command1_Click()
     
    Dim sh As New SHDocVw.Shell
    Dim fd As SHDocVw.Folder
     
    Set fd = sh.BrowseForFolder(Me.hWnd, "Select a computer", BIF_BROWSEFORCOMPUTER, ssfNETWORK)
     
    MsgBox fd.Title & "=" & GetIPaddress(fd.Title)
     
End Sub

 

by: rayfordPosted on 1999-07-12 at 18:56:30ID: 1523615

I want to list the "Directory of shares" on a named PC on the network which has shared some of its drives.

None of these appear to work to do this.  All good code but none are complete as far as I can tell.  The last one gives me an error

How do we  
"'Add a reference to "Microsoft Internet Control" (shdocvw.dll).'"  
as you say?
for c:\windows\system\shdocvw.dll
I'm Needing the Declaration yes?

Also on the proposed answer I do not see any code which will specifically do as I need.  Is there some secret way of using this to not simply invoke the connect network dialog box?  

I'm not looking to activate the connect network shared device dialog.  I can already do that but I want to be able to recall or type in the Computer name like SERVERX and have it display the shares for me to just click the share instead of navigating and persusing the Network Neighborhood or Entire Network using either Explorer or the Connect Network Device Dialog box which relinquishes control and is a locked style interface...  :(
:)

 

by: rayfordPosted on 1999-07-12 at 19:08:37ID: 1523616

The only thing the MS Internet Control adds when I add it is the Blue Browser control?

 

by: rayfordPosted on 1999-07-12 at 22:48:25ID: 1523617

Mirkwood your code appeared promissing but I get

Compile error unknown user defined type?
"Dim sh As New SHDocVw.Shell"
Should I be doing something special with the Internet control seems if I add it only allows me to drop Browser control on forms.  Tried naming browser control SHDocVw same thing of course


 

by: rayfordPosted on 1999-07-12 at 22:54:32ID: 1523618

I Just Can't believe there is NO simple way to get DIR of shares with regular VB and Controls/DLL's?

http://www.mvps.org/ccrp/download/controls/ccrpbds5-b1.zip
http://www.mvps.org/ccrp/download/controls/ccrpbds6-b1.zip
Are the new links for anyone else who wants to try these.  

 

by: Advanced_TechPosted on 1999-07-13 at 09:20:40ID: 1523619

Rayford is working with me on this we are both trying to puzzle this out together and hoping you can help us.  I'm rejecting this answer not because it is completely wrong but because nothing here gets us what we are looking for just yet and still hoping for an actual working "Answer"

The new CCRP Server Browse dialog will not even allow itself to be brought up with a computer already select and share names listed.  

for example:
    .SelectedFolder = "\\MYSVR-1\"
    .RootFolder = "\\MYSVR-1\"
Brings up the DESKTOP when using objBD.Browse


    .SelectedFolder = "\\MYSVR-1\CSHARE"
    .RootFolder = "\\MYSVR-1\"

Brings up the Contents of the CSHARE FODLER when using objBD.Browse

We need to Bring up the Shares themselves not the network neighborhood for in some companies this is an amazing OCEAN of server names and workstation names!  Nor do we want to be required to KNOW the share names such as CSHARE to be able to get it to display.

    .SelectedFolder = "\\MYSVR-1\CSHARE"
    .RootFolder = "\\MYSVR-1\CSHARE"
is the closest to what we want but what we really want is more like
    .SelectedFolder = "\\MYSVR-1\CSHARE\.."
    .RootFolder = "\\MYSVR-1\CSHARE\.."
if you follow my drift but this does not work either it give us the first entry in the Entire Network browse listing..  Maybe future versions of CCRP will work as expected here.  :(  Help!!




 

by: MirkwoodPosted on 1999-07-14 at 01:29:31ID: 1523620

Check project/references
Microsoft Internet Controls
to get shdocvw.shell

 

by: Advanced_TechPosted on 1999-07-20 at 10:55:52ID: 1523621

We have this working now the best input was from Mirkwood please claim your points..

 

by: MirkwoodPosted on 1999-07-20 at 11:12:43ID: 1523622

Thanks

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...