共用方式為


3.1.4.25 NetrServerTransportDel (Opnum 27)

The NetrServerTransportDel method unbinds (or disconnects) the transport protocol from the server. If this method succeeds, the server can no longer communicate with clients by using the specified transport protocol (such as TCP or XNS).

 NET_API_STATUS NetrServerTransportDel(
   [in, string, unique] SRVSVC_HANDLE ServerName,
   [in] DWORD Level,
   [in] LPSERVER_TRANSPORT_INFO_0 Buffer
 );

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.

Level: Specifies the information level of the data. This SHOULD be zero and MUST be ignored on receipt.

Value

Meaning

0

The buffer is of type SERVER_TRANSPORT_INFO_0.

Buffer: A pointer to the SERVER_TRANSPORT_INFO_0 structure that contains information about the transport.

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. The most common error codes are listed in the following table.

Return value/code

Description

0x00000000

NERR_Success

The client request succeeded.

0x00000005

ERROR_ACCESS_DENIED

Access is denied.

0x00000057

ERROR_INVALID_PARAMETER

The parameter is incorrect.

0x00000008

ERROR_NOT_ENOUGH_MEMORY

Not enough storage is available to process this command.

The NetrServerTransportDel message MUST be processed in the same way as the NetrServerTransportDelEx message, except that it MUST allow only level 0 (that is, SERVER_TRANSPORT_INFO_0). The processing for this message is specified in section 3.1.4.26.

The server MAY<98> 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<99> fail the call.