A Windows 98 & ME forum. Win98banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Win98banter forum » Windows 98 » Networking
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

how do you find windows shared folders?



 
 
Thread Tools Display Modes
  #1  
Old October 19th 05, 05:19 PM
external usenet poster
 
Posts: n/a
Default how do you find windows shared folders?

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.

  #2  
Old October 20th 05, 01:58 PM
Norm Cook
external usenet poster
 
Posts: n/a
Default how do you find windows shared folders?

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

wrote in message
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.



  #3  
Old October 20th 05, 01:58 PM posted to comp.lang.basic.visual.misc,microsoft.public.win98.networking,comp.os.ms-windows.networking.tcp-ip
Norm Cook
External Usenet User
 
Posts: 2
Default how do you find windows shared folders?

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

wrote in message
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.



 




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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to my network printer Martin Healy Networking 8 July 6th 05 10:35 PM
error loading explorer.exe. SHLWAPI.dll Gary General 4 October 20th 04 04:08 AM
can't access .pif Ron Jacob General 13 September 7th 04 03:23 AM
Microsoft Security Bulletin MS04-024 - Vulnerability in Windows Shell Could Allow Remote Code Execution (839645) Gary S. Terhune General 2 July 14th 04 05:06 AM
Illegal operation Susan General 14 July 1st 04 11:54 PM


All times are GMT +1. The time now is 06:38 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Win98banter.
The comments are property of their posters.