다음을 통해 공유


NSInstance.StopInstance Method

Stops the Notification Services engine for an instance of Notification Services.

네임스페이스: Microsoft.SqlServer.NotificationServices
어셈블리: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)

구문

‘선언
Public Sub StopInstance
public void StopInstance ()
public:
virtual void StopInstance () sealed
public final void StopInstance ()
public final function StopInstance ()

주의

On each computer that runs components of an instance of Notification Services, there is one Notification Services engine. This engine can be hosted by the NS$instanceNameMicrosoft Windows service, which can be created when you register an instance of Notification Services, or can be hosted by a custom application or service.

You can start and stop an instance of Notification Services on a computer using the StartInstance and StopInstance methods.

ms147206.note(ko-kr,SQL.90).gif중요:
Only one process can own an instance of Notification Services at a time. If your process did not start the instance, it cannot stop the instance. If the reference to the object that started the instance is lost, the instance is stopped during garbage collection.

For more information about hosting the engine, see Notification Services 엔진 호스팅.

The following examples show how to create, initialize, and stop an NSInstance object in managed code:

' Stop an instance of Notification Services 
' that is being hosted by this process.
Public Sub StopInstance(ByVal myInstance As NSInstance)
    Try
        myInstance.StopInstance()
    Catch ex As Exception
        Console.WriteLine(ex.Message)
    End Try
End Sub

HostedEngine#NSCS_StopHostedInstance

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

NSInstance Class
NSInstance Members
Microsoft.SqlServer.NotificationServices Namespace