Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
当服务器已关闭或者当超时到期时(无论何种情况首先出现),将返回。
public virtual bool WaitForServerShutdown(unsigned timeout)
timeout 以毫秒为单位表示等待服务器关闭所需的最长时间。使用 DBSC_INFINITY 可无限期等待响应。
因服务器关闭而返回方法时返回 true;否则返回 false。返回 false 时,您可调用 GetErrorInfo 方法获取有关失败的详细信息。
只有在调用了 ShutdownServer 方法之后才能调用 WaitForServerShutdown。