Platform SDK: Network Management |
The NetServerTransportAdd function binds the server to the transport protocol.
The extended function NetServerTransportAddEx allows the calling application to specify the SERVER_TRANSPORT_INFO_1, SERVER_TRANSPORT_INFO_2, and SERVER_TRANSPORT_INFO_3 information levels.
Only members of the Administrators local group can successfully execute the NetServerTransportAdd function.
NET_API_STATUS NetServerTransportAdd( LPWSTR servername, DWORD level, LPBYTE bufptr );
Value | Meaning |
---|---|
0 | Specifies information about the transport protocol, including name, address, and location on the network. The bufptr parameter points to a SERVER_TRANSPORT_INFO_0 structure. |
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be one of the following error codes.
Value | Meaning |
---|---|
ERROR_ACCESS_DENIED | The user does not have access to the requested information. |
ERROR_DUP_NAME | A duplicate name exists on the network. |
ERROR_INVALID_DOMAINNAME | The domain name could not be found on the network. |
ERROR_INVALID_LEVEL | The value specified for the level parameter is invalid. |
ERROR_INVALID_PARAMETER | The specified parameter is invalid. |
ERROR_NOT_ENOUGH_MEMORY | Insufficient memory is available. |
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Unsupported.
Header: Declared in Lmserver.h; include Lm.h.
Library: Use Netapi32.lib.
Network Management Overview, Network Management Functions, Server and Workstation Transport Functions, NetServerTransportDel, NetServerTransportAddEx, SERVER_TRANSPORT_INFO_0