컴퓨터 공부/COM&ActiveX

[6월 17일 2교시] 이벤트 2

려리군 2009. 6. 17. 15:48

※ 인터페이스를 제거할 때는 idl->h->cpp파일에서 제거해야 한다.


Sync Interface

Sync 인터페이스를 

※ named_guids : 스마트 포인터에서 CLSID를 uuidof하지 않고 곧바로 사용할 수 있다.

MFC 클라이언트면 수동으로 ATL 관련 헤더 파일들을 stdafx.h에 다음과 같이 include 한다.

#include <atlbase.h>

extern CComModule _Module;

#include <atlcom.h>


stdafx.cpp파일에는 다음을 include한다.

#include <atlimpl.cpp>


App관련 cpp파일에는 다음을 추가한다.

CComModule _Module;


InitApp()에 다음을 추가한다.

_Module.Init(NULL,NULL);