AddInProcess.IsCurrentProcess 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
현재 AddInProcess 개체가 호스트 애플리케이션 프로세스를 나타내는지 여부를 나타내는 값을 가져옵니다.
public:
property bool IsCurrentProcess { bool get(); };
public bool IsCurrentProcess { get; }
member this.IsCurrentProcess : bool
Public ReadOnly Property IsCurrentProcess As Boolean
속성 값
예제
다음은 외부 프로세스에서 추가 기능을 활성화하고 속성을 사용하여 IsCurrentProcess 추가 기능이 호스트 애플리케이션 프로세스와 동일한 프로세스에 있는지 여부를 확인하는 예제입니다.
// Create an external process.
AddInProcess pExternal = new AddInProcess();
// Activate an add-in in the external process
// with a full trust security level.
Calculator CalcAddIn4 =
selectedToken.Activate<Calculator>(pExternal,
AddInSecurityLevel.FullTrust);
// Show that the add-in is an external process
// by verifying that it is not in the current (host's) process.
AddInController AddinCtl = AddInController.GetAddInController(CalcAddIn4);
Console.WriteLine("Add-in in host's process: {0}",
AddinCtl.AddInEnvironment.Process.IsCurrentProcess);
' Create an external process.
Dim pExternal As New AddInProcess()
' Activate an add-in in the external process
' with a full trust security level.
Dim CalcAddIn4 As Calculator =
selectedToken.Activate(Of Calculator)(pExternal,
AddInSecurityLevel.FullTrust)
' Show that the add-in is an external process
' by verifying that it is not in the current (host's) process.
Dim AddinCtl As AddInController = AddInController.GetAddInController(CalcAddIn4)
Console.WriteLine("Add-in in host's process: {0}",
AddinCtl.AddInEnvironment.Process.IsCurrentProcess)
설명
이 속성의 값이 true면 추가 기능이 호스트 애플리케이션에서 In-process로 실행되고 있습니다. 이 경우 또는 Shutdown 메서드InvalidOperationException를 Start 사용하면 .
메모
이 속성은 AddInEnvironment.Process 추가 기능이 In-process에서 실행 중인 경우 호스트 애플리케이션 프로세스를 나타내는 개체를 반환 AddInProcess 합니다.