Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for a way to find all network shares
Message
 
 
To
12/05/2004 14:16:26
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00901701
Message ID:
00903345
Views:
27
Walter,

Make following changes in GetAllShare
* GetMoreShare
...
*		IF NOT ISNULL(oNR.GetRemoteName())
		IF NOT ISNULL(oNR.GetRemoteName()) AND NOT EMPTY(oNR.GetRemoteName())
			? oNR.GetLocalName(), oNR.GetRemoteName(), ;
                          oNR.GetProviderName(), oNR.GetUseage(), oNR.GetType()
			IF 'CONTAINER' $ oNR.GetUseage()
				* Comment out two following lines
				*oNR.SetUseage('CONTAINER')
				*oNR.BuildNETRESOURCE
				=GetMoreShare(oNR.cNetResource, oHeap)
			ENDIF
		ENDIF
**
...
Keep in mind that it can take a while to enumerate resources on the network.

>I have been trying for several days now to utilize the NetResource.Prg (in conjunction with the getallshare.prg demo), but have had no success. The WNETOPENENUM function as used polls the network root as advertised, but when ramifying to container resources, it produces "invalid parameter" error codes, which I assume have to do with the passed (container) net resource itself, since the other parameters are identical to the first WNETOPENENUM call. Additional advice would be appreciated, but certainly not expected.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform