Platform SDK: Network Management |
The NetWkstaTransportAdd function binds (or connects) the redirector to the transport. The redirector is the software on the client computer which generates file requests to the server computer.
Only members of the Administrators local group can successfully execute the NetWkstaTransportAdd function.
NET_API_STATUS NetWkstaTransportAdd( LPWSTR servername, DWORD level, LPBYTE buf, LPDWORD parm_err );
Value | Meaning |
---|---|
0 | Specifies workstation transport protocol information. The buf parameter points to a WKSTA_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_INVALID_LEVEL | The level parameter, which indicates what level of data structure information is available, is invalid. |
ERROR_INVALID_PARAMETER | One of the function parameters is invalid. |
If the NetWkstaTransportAdd function returns ERROR_INVALID_PARAMETER, you can use the parm_err parameter to indicate the member of the WKSTA_TRANSPORT_INFO_0 structure that is invalid. The following table lists the values that can be returned in the parm_err parameter and the corresponding structure member that is in error.
Value | Member |
---|---|
TRANSPORT_QUALITYOFSERVICE_PARMNUM | wkti0_quality_of_service |
TRANSPORT_NAME_PARMNUM | wkti0_transport_name |
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Unsupported.
Header: Declared in Lmwksta.h; include Lm.h.
Library: Use Netapi32.lib.
Network Management Overview, Network Management Functions, Server and Workstation Transport Functions, NetWkstaTransportDel, WKSTA_TRANSPORT_INFO_0