Networking Forums

Networking Forums > Computer Networking > Windows Networking > how do you find windows shared folders?

Reply
Thread Tools Display Modes

how do you find windows shared folders?

 
 
bobrien18@yahoo.com
Guest
Posts: n/a

 
      10-19-2005, 04:19 PM
I am writing a piece of software to back up a shared folder on one
computer to another computer.
I need a list of the shared folders available on the network I am
connected to by ethernet.
The computers are both windows machines... One is a Windows 98 computer
and the other (the one that is doing the query) is windows XP.

I am writing in VB6 and Visual C++ (I do OCXs in C++)

I am comfortable writing socket level code to broadcast a discovery
packet if that is necessary,
and parse the response results, but if there is already an API for this
then of course that would be better.

Thanks.
B.

 
Reply With Quote
 
 
 
 
Norm Cook
Guest
Posts: n/a

 
      10-20-2005, 12:58 PM
Below is a function to tell you if a folder is shared. Now you need code
to enumerate network folders. Perhaps you can use this:
http://vbnet.mvps.org/code/browse/browsenetwork.htm

Const SHGFI_ATTRIBUTES = &H800
Const SFGAO_SHARE = &H20000
Private Type SHFILEINFO
hIcon As Long
iIcon As Long
dwAttributes As Long
szDisplayName As String * 260
szTypeName As String * 80
End Type
Private Declare Function SHGetFileInfo Lib "shell32.dll" Alias
"SHGetFileInfoA" _
(ByVal pszPath As String, ByVal dwFileAttributes As Long, _
psfi As SHFILEINFO, ByVal cbFileInfo As Long, ByVal uFlags As Long) As
Long
Private Function IsFolderShared(ByVal folderName As String) As Boolean
Dim sfi As SHFILEINFO
SHGetFileInfo folderName, 0, sfi, Len(sfi), SHGFI_ATTRIBUTES
IsFolderShared = (sfi.dwAttributes And SFGAO_SHARE)
End Function

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I am writing a piece of software to back up a shared folder on one
> computer to another computer.
> I need a list of the shared folders available on the network I am
> connected to by ethernet.
> The computers are both windows machines... One is a Windows 98 computer
> and the other (the one that is doing the query) is windows XP.
>
> I am writing in VB6 and Visual C++ (I do OCXs in C++)
>
> I am comfortable writing socket level code to broadcast a discovery
> packet if that is necessary,
> and parse the response results, but if there is already an API for this
> then of course that would be better.
>
> Thanks.
> B.
>



 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 2008 R2 Shared folders Guido Windows Networking 1 02-06-2010 09:56 AM
SAMBA Question, Linux box can't see Windows Shared folders General Schvantzkoph Linux Networking 1 12-11-2008 11:56 PM
windows 98 and xp shared folders issue on an NT domain jbraly@gmail.com Windows Networking 9 09-06-2005 05:17 PM
Windows Server 2003 Shared Folders M Sihra Windows Networking 1 04-09-2005 04:17 PM
Windows 2000 Pro, Windows Millenium Edition and shared folders David Christensen Windows Networking 4 11-16-2003 04:19 AM



1 2 3 4 5 6 7 8 9 10 11