C# 클래스 Smrf.AppLib.ExcelApplicationKiller

Kills an Excel application's process on demand.
The KillExcelApplication method kills the process running an Excel application. It can be used to guarantee that an Excel application started from a parent process is removed from memory when the parent process is done with the Excel application.

There are various situations in which calling Application.Quit() will not remove the Excel application from memory; see this posting for more information:

http://www.dotnet247.com/247reference/msgs/68/344322.aspx

Suggested solutions involving calls to Marshall.ReleaseComObject(), never referencing an Excel object more than one level deep without storing it in an intermediate variable, and so on, are either unreliable or fragile and grossly impractical. This class offers a brute-force workaround for all those problems.

상속: Object
파일 보기 프로젝트 열기: 2014-sed-team3/term-project 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_iProcessID System.Int32

공개 메소드들

메소드 설명
ExcelApplicationKiller ( Microsoft visibleExcelApplication ) : System

Initializes a new instance of the ExcelApplicationKiller class.

KillExcelApplication ( ) : void

비공개 메소드들

메소드 설명
AssertValid ( ) : void

메소드 상세

ExcelApplicationKiller() 공개 메소드

Initializes a new instance of the ExcelApplicationKiller class.
public ExcelApplicationKiller ( Microsoft visibleExcelApplication ) : System
visibleExcelApplication Microsoft /// The Excel application that will be killed by . The application must be visible. ///
리턴 System

KillExcelApplication() 공개 메소드

public KillExcelApplication ( ) : void
리턴 void

프로퍼티 상세

m_iProcessID 보호되어 있는 프로퍼티

protected Int32,System m_iProcessID
리턴 System.Int32