MATLAB에서 COM 객체 사용하기
Microsoft® COM(Component Object Model)은 재사용 가능한 이진 소프트웨어 컴포넌트를 애플리케이션에 통합할 수 있도록 하는 프레임워크를 제공합니다. 컴포넌트는 컴파일된 코드로 구현되므로, COM을 지원하는 프로그래밍 언어로 컴포넌트의 소스 코드를 작성할 수 있습니다. 컴파일할 때는 전체 애플리케이션을 다시 컴파일할 필요 없이 컴포넌트를 간단히 바꾸면 되므로 애플리케이션 업그레이드가 간편해집니다. 또한 애플리케이션에게는 컴포넌트의 위치가 투명(Transparent)하기 때문에 애플리케이션을 수정하지 않고도 컴포넌트를 개별 프로세스나 원격 시스템에 재배치할 수 있습니다.
또는 Microsoft .NET 애플리케이션 사용을 고려해 보십시오. 자세한 내용은 MATLAB에서 .NET 호출하기 항목을 참조하십시오.
MATLAB은 Windows® 플랫폼에서만 COM과 .NET을 지원합니다.
함수
actxserver | COM 서버 생성 |
actxGetRunningServer | 실행 중인 자동화 서버 인스턴스에 대한 핸들 |
methodsview | 클래스 메서드(Class Method) 보기 |
eventlisteners | COM 객체 이벤트와 연결된 이벤트 핸들러(Event Handler) 함수 나열 |
registerevent | Associate event handler for COM object event at run time |
unregisterallevents | Unregister all event handlers associated with COM object events |
unregisterevent | Unregister event handler associated with COM object event at run time |
iscom | 입력값이 COM 객체인지 확인 |
isevent | 입력값이 COM 객체 이벤트인지 확인 |
isinterface | 입력값이 COM 인터페이스인지 확인 |
객체
COM | MATLAB에서 COM 컴포넌트에 액세스 |
도움말 항목
COM과의 통합
- MATLAB COM Integration
COM concepts and an overview of COM support in MATLAB. - COM 시작하기
MATLAB에서 COM 인터페이스를 사용하는 방법을 보여주는 예제. - Register Servers
Before using COM objects, you must register their servers. - COM 객체 만들기
Microsoft 컨트롤과 COM 서버 객체를 만드는 방법 - Handle COM Data in MATLAB
Pass data to and handle data from a COM object. - COM Object Properties
List property names and set values, work with multiple objects and properties, use the Property Inspector, use enumerated values and custom properties. - COM Methods
You execute, or invoke, COM functions or methods belonging to COM objects. - COM Events
Respond to events, write event handlers. - COM Event Handlers
Useregisterevent
to register server events. - Save and Delete COM Objects
Use these MATLAB functions to save and restore the state of a COM control object. - COM Object Interfaces
Use COM interfaces. - COM Collections
COM collections are a way to support groups of related COM objects that can be iterated over. - Supported Client/Server Configurations
COM client-server configurations in MATLAB. - MATLAB Application as DCOM Client
Distributed Component Object Model (DCOM) is a protocol that allows clients to use remote COM objects over a network. - Explore COM Objects
Learn about a COM object using MATLAB commands.
Microsoft Office
- Excel을 자동화 서버로 사용하여 스프레드시트 데이터 쓰기
이 예제에서는 Excel® 스프레드시트에 MATLAB 행렬을 작성하는 방법을 보여줍니다. - Excel을 자동화 서버로 사용하여 스프레드시트 데이터 읽기
이 예제에서는 COM 자동화 서버를 사용하여 MATLAB에서 다른 애플리케이션에 액세스하는 방법을 보여줍니다. - 스프레드시트에서 커서 변경하기
이 예제에서는 Excel® 스프레드시트에서 커서 아이콘을 변경하는 방법을 보여줍니다. - 스프레드시트의 특정 범위의 셀에서 행 높이 변경하기
이 예제에서는 스프레드시트에서Range
객체로 정의된 행의 높이를 변경하는 방법을 보여줍니다. - 첫 번째 시트 뒤에 스프레드시트 삽입하기
이 예제에서는 시트를 통합 문서에 삽입하는 데 사용되는 ExcelAdd
메서드에서 선택적 입력 인수를 건너뛰는 방법을 보여줍니다. - 기존 Excel 애플리케이션에 연결하기
이 예제에서는 MATLAB에 열려 있는 파일weekly_log.xlsx
에서 데이터를 읽어 들이는 방법을 보여줍니다. - Display Message for Workbook OnClose Event
This example shows how to handle a COM interface event, how to set up an event in a Microsoft Excelworkbook
object, and how to handle itsBeforeClose
event.
문제 해결
MATLAB COM Support Limitations
Microsoft does not support loading 32-bit DLLs or in-process COM servers into a 64-bit application, or conversely.
Interpreting Argument Callouts in COM Error Messages
When a MATLAB client sends a command with an invalid argument to a COM server application, the server sends back an error message in the following format.