검색결과 리스트
글
[VC++] visual studio 2008 Excel Automation "\excel.tlh(1219) : error C2371: 'FontPtr' : redefinition; different basic types"
C/C++/VC++ / MFC 2011. 8. 5. 15:19
설정
Visual Studio 2008 MFC 프로그램에서 Excel Automation을 사용(Add Class From Typelib)할려고 디폴트로 사용할려고 하니
알수 없는 에러가 발생했다.
#해결1
http://www.ms-news.net/f3295/ms-office-type-library-problem-2533193.html
참조 : http://support.microsoft.com/kb/308292
http://support.microsoft.com/kb/311407/EN-US
#해결2
에러는 해결했는데 Warning이 발생한것도 있고 Typelib를 이용해서 클래스 만들어주는게 다 만들어주는것도 아니고해서
결국직접 typelib를 임포트 해서 스마트포인터를 사용해서 해결했다.
* office11은 MS Office 2003 버전이다.
* 32bit 버전이라면 'Program Files (x86)'이 아니라 'Program Files' 이다.
알수 없는 에러가 발생했다.
#해결1
http://www.ms-news.net/f3295/ms-office-type-library-problem-2533193.html
참조 : http://support.microsoft.com/kb/308292
http://support.microsoft.com/kb/311407/EN-US
#해결2
에러는 해결했는데 Warning이 발생한것도 있고 Typelib를 이용해서 클래스 만들어주는게 다 만들어주는것도 아니고해서
결국직접 typelib를 임포트 해서 스마트포인터를 사용해서 해결했다.
#import "C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE11\\MOS.DLL" \
rename("RGB", "excelRGB")
#import "C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.OLB"
#import "C:\\Program Files (x86)\\Microsoft Office\\OFFICE11\\excel.exe" \
rename("DialogBox", "excelDialogBox") \
rename("RGB", "excelRGB") \
rename("CopyFile", "excelCopyFile") \
no_dual_interface
using namespace Excel;
* office11은 MS Office 2003 버전이다.
* 32bit 버전이라면 'Program Files (x86)'이 아니라 'Program Files' 이다.
'C/C++ > VC++ / MFC' 카테고리의 다른 글
[C++] C++11 (0) | 2013.01.29 |
---|---|
[COM] WebBrowser Customization (0) | 2012.12.29 |
[MFC] MFC에서 Token 분리 (0) | 2011.07.21 |
[MFC] CListCtrl 현재 행 선택하기 (0) | 2011.03.20 |
COM Automation 에서 옵션인자 설정 방법 (0) | 2011.03.03 |
RECENT COMMENT