Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows VistaWindows XPWindows MeWindows 98Windows 95Virtual PCInternet ExplorerOutlook ExpressWindows MediaSecurity
Related Topics
MS Server ProductsMS OfficePC HardwareMore Topics ...

Windows Forum / Windows 98 / Networking / October 2005

Tip: Looking for answers? Try searching our database.

how do you find windows shared folders?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bobrien18@yahoo.com - 19 Oct 2005 17:19 GMT
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.
Norm Cook - 20 Oct 2005 13:58 GMT
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

> I am writing a piece of software to back up a shared folder on one
> computer to another computer.
[quoted text clipped - 12 lines]
> Thanks.
> B.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.