AddInProcess 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
호스트 애플리케이션에서 out-of-process 추가 기능을 실행하기 위한 외부 프로세스를 제공합니다.
public ref class AddInProcess sealed
public sealed class AddInProcess
type AddInProcess = class
Public NotInheritable Class AddInProcess
- 상속
-
AddInProcess
예제
다음 예제에서는 외부 프로세스에서 추가 기능을 활성화합니다.
// 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)
설명
외부 프로세스에서 추가 기능을 활성화하려면 개체를 AddInProcess 적절한 AddInToken.Activate<T>(AddInProcess, PermissionSet) 메서드 오버로드에 전달합니다.
추가 기능을 실행하는 실행 파일은 Windows 디렉터리 아래에 .NET Framework와 함께 설치된 두 파일 중 하나에서 가져옵니다. 기본적으로 호스트 애플리케이션의 단어당 비트와 일치하는 실행 파일이 사용됩니다. 호스트가 64비트 프로세스인 경우 AddInProcess.exe 실행됩니다. 그렇지 않으면 AddInProcess32.exe 실행됩니다. 실행 파일을 선택하는 방법을 지정하려면 생성자를 사용하여 AddInProcess(Platform) 개체를 만듭니다 AddInProcess .
생성자
| Name | Description |
|---|---|
| AddInProcess() |
AddInProcess 클래스의 새 인스턴스를 초기화합니다. |
| AddInProcess(Platform) |
추가 기능이 실행되는 프로세스의 AddInProcess 단어당 비트를 지정하여 클래스의 새 인스턴스를 초기화합니다. |
속성
| Name | Description |
|---|---|
| IsCurrentProcess |
현재 AddInProcess 개체가 호스트 애플리케이션 프로세스를 나타내는지 여부를 나타내는 값을 가져옵니다. |
| KeepAlive |
외부 프로세스를 활성 상태로 유지할지 여부를 나타내는 값을 가져오거나 설정합니다. |
| Platform |
out-of-process 추가 기능이 실행되는 프로세스의 단어당 비트를 가져옵니다. |
| ProcessId |
외부 프로세스의 프로세스 ID를 가져옵니다. |
| StartupTimeout |
프로세스를 시작할 수 있는 시간(초)을 가져오거나 설정합니다. |
메서드
| Name | Description |
|---|---|
| Equals(Object) |
지정한 개체와 현재 개체가 같은지 여부를 확인합니다. (다음에서 상속됨 Object) |
| GetHashCode() |
기본 해시 함수로 작동합니다. (다음에서 상속됨 Object) |
| GetType() |
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| MemberwiseClone() |
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| Shutdown() |
외부 프로세스를 강제로 종료합니다. |
| Start() |
외부 프로세스를 시작합니다. |
| ToString() |
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |
이벤트
| Name | Description |
|---|---|
| ShuttingDown |
개체가 나타내는 AddInProcess 프로세스가 종료될 때 발생합니다. |