검색결과 리스트
Automation에 해당되는 글 3건
글
'IDE/Tool > Visual Studio' 카테고리의 다른 글
[Visual Studio] Visual Studio 설치 관리자 (0) | 2013.04.17 |
---|---|
[Visual Stdio 2010] 공백 표시 (0) | 2013.03.08 |
[Visual Studio 2010] Visual Studio Automatically using (0) | 2012.12.18 |
[Visual Stdio 2010] Developing Visual Studio Extensions (0) | 2012.12.13 |
[Visual Studio 2010] Productivity Power Tools, anksvn 확장 프로그램 (0) | 2012.12.13 |
트랙백
댓글
글
[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 |
트랙백
댓글
글
ADO를 이용해서 Recordset 개체를
Open하는데 두번째 인자(ActiveConnection)는 옵션인자입니다.
'Visual Basic recordset.Open Source, ActiveConnection, CursorType, LockType, Options
이걸 그냥 NULL 이렇게 주면은 실행시 예외를 떨굽니다.
이럴떼 NULL 대신
// Visual C++ _variant_t vOPTION; vOPTION.vt = VT_ERROR; vOPTION.scode = DISP_E_PARAMNOTFOUND;
해주시면 됩니다.
p.s. 2011-08-06 추가
MFC에서 컴관련 클래스로 COleVariant가 있습니다.
COleVariant vOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
'C/C++ > VC++ / MFC' 카테고리의 다른 글
[MFC] MFC에서 Token 분리 (0) | 2011.07.21 |
---|---|
[MFC] CListCtrl 현재 행 선택하기 (0) | 2011.03.20 |
#pragma message (0) | 2011.02.25 |
Predefines Macros (0) | 2011.02.16 |
[링크] 일정 시간이 흐른후 메세지 박스 종료하기 (0) | 2011.02.15 |
RECENT COMMENT