wntShareDel

UN-shares a resource.

Syntax:

wntShareDel(server-name, resource/share-name, share-type)

Parameters:

(s) server-name: name of a network file server or empty string ("") to indicate the current machine.

(s) resource/share-name: identifies the object to be modified.

(i) share-type: identifies the type of the 'resource' object.  0 = directory, 1 = printer, 2 = device, 3 = IPC shares and 2147483648 = special shares

Returns:

(s) @TRUE if the share was deleted; @FALSE if there was no share with the specified name.

 

If 'share-type' = 1 (printer), then 'resource/share-name' should specify the object's resource name (e.g., "HP LaserJet III"). Otherwise, it should specify the object's share name.

 

Note: Only members of the Administrators, Server Operators, or Power Users local group, or those with Server Operator group membership, can successfully delete file shares with this function. The Print Operator can delete printer shares.

 

Example:
; Load Appropriate Extender
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

; This example removes the "Public" share from the system. rslt=wntShareDel("","Public",0) If rslt    Message("wntShareDel","Share PUBLIC deleted") Else    Message("wntShareDel","Share PUBLIC not found") EndIf Exit
See Also:

wntShareAdd, wntShareSet