RasAdminPortDisconnect 函数

[此函数仅用于向后兼容 Windows NT Server 4.0。 它在 Windows Server 2003 上返回ERROR_CALL_NOT_IMPLEMENTED。 应用程序应使用 MprAdminPortDisconnect 函数。]

RasAdminPortDisconnect 函数断开当前正在使用的端口的连接。

语法

DWORD RasAdminPortDisconnect(
  _In_ const WCHAR *lpszServer,
  _In_ const WCHAR *lpszPort
);

parameters

lpszServer [in]

指向以 null 结尾的 Unicode 字符串的指针,该字符串指定Windows NT/Windows 2000 RAS 服务器的名称。 指定具有前导“\\”字符的名称,格式为:\\servername

lpszPort [in]

指向以 null 结尾的 Unicode 字符串的指针,该字符串指定服务器上的端口名称。

返回值

如果函数成功,则返回值为 ERROR_SUCCESS。

如果函数失败,则返回值可能是以下错误代码之一。

含义
ERROR_INVALID_PORT
指定的端口无效。
NERR_UserNotFound
端口当前未使用。

此函数没有扩展的错误信息;不要调用 GetLastError

要求

要求
客户端支持终止
Windows 2000 Professional
终止服务器支持
Windows 2000 Server
标头
Rassapi.h

Rassapi.lib
DLL
Rassapi.dll

另请参阅

远程访问服务 (RAS) 概述

RAS 服务器管理功能