This code sample presents the SharedResources class that encapsulates a collection of the SHARE_INFO_2 objects.
Note that all NetShare API calls require Unicode string parameters.
Use the following code to test the SharedResources class:
LOCAL oShares As SharedResources, oShare As Share_Info_2
oShares = CREATEOBJECT("SharedResources") && local computer
FOR EACH oShare IN oShares.shares
IF oShare.sharetype=0 && disk drive
? FromUnicode(oShare.sharename) + "=" +;
FromUnicode(oShare.localpath)
ENDIF
NEXT
Administrator, Power User, Print Operator, or Server Operator group membership is required to successfully execute the NetShareEnum function at levels 2 and 502.
The ANETRESOURCES( ) function places the names of network shares or printers into an array and then returns the number of resources.
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
AceHTML Freeware
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc.