|
|
|
Вопрос по директиве #import
|
|||
|---|---|---|---|
|
#18+
Выполняю обычное подключение библиотек типов Office приложений и Word c помощью дерективы #import Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. последовательность подключения библиотек типов - правельное, сначала надо MSO.DLL и VBE6EXT.OLB, потом только MSWORD.OLB, так как использует типы из предыдущих двух библ. Во время компиляции возникают ощибки связанные именно с импортом типов c:\tests\visual_c\com_плагин_!!!\sharedaddin\sharedaddin\debug\vbe6ext.tli(248) : error C2440: 'return' : cannot convert from '__missing_type__ *' to '__missing_type__' This conversion requires a reinterpret_cast, a C-style cast or function-style cast c:\tests\visual_c\com_плагин_!!!\sharedaddin\sharedaddin\debug\msword.tlh(6989) : error C2059: syntax error : 'constant' c:\tests\visual_c\com_плагин_!!!\sharedaddin\sharedaddin\debug\msword.tlh(36408) : error C2497: 'Word::Tasks::ExitWindowsEx' : 'implementation_key' can only be applied to function declarations Первая из них, т.е код её выше 248 при импорте VBE6EXT.OLB остальные при импорте MSWORD.OLB В чем проблема, как полечить? Директива глючит и генерит не верные .tli и .tlh ??? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.03.2007, 18:27 |
|
||
|
Вопрос по директиве #import
|
|||
|---|---|---|---|
|
#18+
Что-то глухо! Где все ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2007, 10:26 |
|
||
|
Вопрос по директиве #import
|
|||
|---|---|---|---|
|
#18+
И шо ни кто встречал подобной беды? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2007, 19:01 |
|
||
|
Вопрос по директиве #import
|
|||
|---|---|---|---|
|
#18+
У всех так или у меня одного только ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.03.2007, 11:31 |
|
||
|
Вопрос по директиве #import
|
|||
|---|---|---|---|
|
#18+
У буржуев сходная проблема: Буржуй Getting Compilation errors in vbe6ext.tli when building an app having VBASDK support Hi , I have an app that is having the VBASDK6.4 support . When , i am trying to build it , i am getting compilation errrors:- Compilation errors : c:\Program Files\VBA6SDK\include\Apc.h(246) : error C4772: #import referenced a type from a missing type library; '__missing_type__' used as a placeholder d:\Latest Code\vbe6ext.tli(248) : error C2440: 'return' : cannot convert from '__missing_type__ *' to '__missing_type__' This conversion requires a reinterpret_cast, a C-style cast or function-style cast The entries present in vbe6ext.tli files are :- Entry in VBE6EXT.TLH file VBE : Application { // // Property data // __declspec(property(get=GetActiveVBProject,put=PutRefActiveVBProject)) _VBProjectPtr ActiveVBProject; __declspec(property(get=GetSelectedVBComponent)) _VBComponentPtr SelectedVBComponent; __declspec(property(get=GetVBProjects)) _VBProjectsPtr VBProjects; __declspec(property(get=GetCommandBars)) __missing_type__ CommandBars; __declspec(property(get=GetCodePanes)) _CodePanesPtr CodePanes; __declspec(property(get=GetWindows)) _WindowsPtr Windows; __declspec(property(get=GetEvents)) EventsPtr Events; __declspec(property(get=GetMainWindow)) WindowPtr MainWindow; __declspec(property(get=GetActiveWindow)) WindowPtr ActiveWindow; __declspec(property(get=GetActiveCodePane,put=PutRefActiveCodePane)) _CodePanePtr ActiveCodePane; __declspec(property(get=GetAddins)) _AddInsPtr Addins; // // Wrapper methods for error-handling // _VBProjectsPtr GetVBProjects ( ); __missing_type__ GetCommandBars ( ); _CodePanesPtr GetCodePanes ( ); _WindowsPtr GetWindows ( ); EventsPtr GetEvents ( ); _VBProjectPtr GetActiveVBProject ( ); void PutRefActiveVBProject ( struct _VBProject * lppptReturn ); _VBComponentPtr GetSelectedVBComponent ( ); WindowPtr GetMainWindow ( ); WindowPtr GetActiveWindow ( ); _CodePanePtr GetActiveCodePane ( ); void PutRefActiveCodePane ( struct _CodePane * ppCodePane ); _AddInsPtr GetAddins ( ); Entry in VBE6EXT.TLI file inline __missing_type__ VBE::GetCommandBars ( ) { __missing_type__ * _result; HRESULT _hr = get_CommandBars(&_result); if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); return _result; } My System Settings are :- System Settings : Office 2003+ VS.NET 2003+ windows XP SP2 The import library paths for the project is :- Include Library Paths :- C:\Program Files\Common Files\Microsoft Shared\OFFICE11 C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6 C:\Program Files\VBA6SDK\VBA\Release C:\Program Files\VBA6SDK\VBA\Release\1033 This problem was earlier reported in this group by some developer a year back but solution is not mentioned . Please help me in finding the solution of this problem. regards...Somil ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.03.2007, 15:20 |
|
||
|
Вопрос по директиве #import
|
|||
|---|---|---|---|
|
#18+
Вобщем никто так и не ответил - жаль, поэтому ушло кучу времени и я разобрадся сам ниже работающий импорт Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.03.2007, 16:15 |
|
||
|
|

start [/forum/topic.php?fid=57&fpage=301&tid=2029150]: |
0ms |
get settings: |
7ms |
get forum list: |
14ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
45ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
53ms |
get tp. blocked users: |
1ms |
| others: | 198ms |
| total: | 334ms |

| 0 / 0 |
