共用方式為


3.1.4.37 NetrDfsDeleteLocalPartition (Opnum 45)

The NetrDfsDeleteLocalPartition method deletes a DFS share (Prefix) on the server. An implementation MAY<139> choose to support this method.

 NET_API_STATUS NetrDfsDeleteLocalPartition(
   [in, string, unique] SRVSVC_HANDLE ServerName,
   [in] GUID* Uid,
   [in, string] WCHAR* Prefix
 );

ServerName: An SRVSVC_HANDLE (section 2.2.1.1) pointer that identifies the server. The client MUST map this structure to an RPC binding handle (see [C706] sections 4.3.5 and 5.1.5.2). The server MUST ignore this parameter.

Uid: Specifies the GUID of the DFS share to delete. This GUID MUST be obtained by using the NetrDfsGetInfo (Opnum 4) method, which is specified in [MS-DFSNM] section 3.1.4.1.6.

Prefix: A pointer to a null-terminated UTF-16 string that contains the path to the DFS share.

Return Values: The method returns 0x00000000 (NERR_Success) to indicate success; otherwise, it returns a nonzero error code. The method can take any specific error code value, as specified in [MS-ERREF] section 2.2.

In response to a NetrDfsDeleteLocalPartition message, the server SHOULD<140> choose to perform no processing and return an implementation-specific error code when this method is called. If the server supports DFS, the server MAY delete a DFS share.

The Prefix parameter specifies the path of the DFS share to delete. This string MUST be in one of the following two forms:

  • The first form is \Dfsname\sharename, where Dfsname is the name of the storage server that hosts the root of a standalone DFS implementation; and sharename is the name of a shared folder that is published on the DFS host server.

  • The second form is \DomainName\DomDfsname, where DomainName is the name of the domain that hosts the DFS root; and DomDfsname is the root name of a domain-based DFS implementation that is published in the directory service of the domain.

If the server cannot find a DFS share whose GUID matches the Uid parameter and whose path matches the Prefix parameter, it MUST fail the call with an implementation-specific error code. If a matching share is found, the server deletes the share and returns 0.

The server MAY<141> enforce security measures to verify that the caller has the required permissions to execute this call. If the server enforces these security measures and the caller does not have the required credentials, the server SHOULD<142> fail the call.