我想创建MSOUTL.OLB文件的 .thl 和 .tli 文件,因为我想使用 #include 语句在我的 C++ 项目中使用生成的 .thl 和 .tli 文件。为此,我正在使用下面的代码行,它会引发如下所述的错误。知道为什么会这样吗?
#import "C:\\Program Files\\Microsoft Office\\root\\Office16\\MSOUTL.OLB" rename("CopyFile", "OlkCopyFile") named_guids
当我编译它时。它抛出以下错误
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6767): error C3646: 'Assistant': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6767): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6777): error C3646: 'Assistance': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6777): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6781): error C3646: 'COMAddIns': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6781): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6783): error C3646: 'PickerDialog': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6783): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6789): error C3646: 'LanguageSettings': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6789): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6797): error C3646: 'AnswerWizard': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6797): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6801): error C3646: 'MsoDebugOptions': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6801): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6805): error C3646: 'DataPrivacyOptions': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6805): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6815): error C3646: 'GetAssistant': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6815): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6815): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6830): error C3646: 'GetCOMAddIns': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6830): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6830): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6833): error C3646: 'GetLanguageSettings': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6833): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6833): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6835): error C3646: 'GetAnswerWizard': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6835): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6835): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6858): error C3646: 'GetAssistance': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6858): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6858): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6860): error C3646: 'GetPickerDialog': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6860): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6860): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6863): error C3646: 'GetMsoDebugOptions': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6863): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6863): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6864): error C3646: 'GetDataPrivacyOptions': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6864): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6864): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(7087): error C3646: 'CreateContactCard': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(7087): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(7088): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(7971): error C3646: 'CommandBars': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(7971): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(8009): error C3646: 'GetCommandBars': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(8009): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(8009): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(18001): error C3646: 'CommandBars': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(18001): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(18057): error C3646: 'GetCommandBars': unknown override specifier
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(18057): error C2059: syntax error: '('
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(18057): error C2238: unexpected token(s) preceding ';'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21638): error C2556: 'Outlook::AddressEntryPtr Outlook::_AppointmentItem::GetOrganizer(void)': overloaded function differs only by return type from '_bstr_t Outlook::_AppointmentItem::GetOrganizer(void)'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21536): note: see declaration of 'Outlook::_AppointmentItem::GetOrganizer'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21638): error C2371: 'Outlook::_AppointmentItem::GetOrganizer': redefinition; different basic types
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21536): note: see declaration of 'Outlook::_AppointmentItem::GetOrganizer'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28929): error C2039: 'GetAssistant': is not a member of 'Outlook::_Application'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28929): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28929): error C2497: 'AssistantPtr': 'implementation_key' can only be applied to function declarations
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28929): error C2146: syntax error: missing ';' before identifier 'GetAssistant'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28939): error C2039: 'GetCOMAddIns': is not a member of 'Outlook::_Application'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28939): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28939): error C2497: 'COMAddInsPtr': 'implementation_key' can only be applied to function declarations
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28939): error C2146: syntax error: missing ';' before identifier 'GetCOMAddIns'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28942): error C2039: 'GetLanguageSettings': is not a member of 'Outlook::_Application'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28942): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28942): error C2497: 'LanguageSettingsPtr': 'implementation_key' can only be applied to function declarations
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28942): error C2146: syntax error: missing ';' before identifier 'GetLanguageSettings'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28944): error C2039: 'GetAnswerWizard': is not a member of 'Outlook::_Application'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28944): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28944): error C2497: 'AnswerWizardPtr': 'implementation_key' can only be applied to function declarations
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28944): error C2146: syntax error: missing ';' before identifier 'GetAnswerWizard'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28956): error C2039: 'GetAssistance': is not a member of 'Outlook::_Application'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28956): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28956): error C2497: 'IAssistancePtr': 'implementation_key' can only be applied to function declarations
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28956): error C2146: syntax error: missing ';' before identifier 'GetAssistance'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28958): error C2039: 'GetPickerDialog': is not a member of 'Outlook::_Application'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28958): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28958): error C2497: 'PickerDialogPtr': 'implementation_key' can only be applied to function declarations
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28958): error C2146: syntax error: missing ';' before identifier 'GetPickerDialog'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28960): error C2039: 'GetMsoDebugOptions': is not a member of 'Outlook::_Application'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28960): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28960): error C2497: 'MsoDebugOptionsPtr': 'implementation_key' can only be applied to function declarations
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28960): error C2146: syntax error: missing ';' before identifier 'GetMsoDebugOptions'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28961): error C2039: 'GetDataPrivacyOptions': is not a member of 'Outlook::_Application'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28961): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28961): error C2497: 'DataPrivacyOptionsPtr': 'implementation_key' can only be applied to function declarations
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28961): error C2146: syntax error: missing ';' before identifier 'GetDataPrivacyOptions'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(29006): error C2039: 'CreateContactCard': is not a member of 'Outlook::_NameSpace'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6960): note: see declaration of 'Outlook::_NameSpace'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(29006): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(29006): error C2497: 'ContactCardPtr': 'implementation_key' can only be applied to function declarations
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(29006): error C2146: syntax error: missing ';' before identifier 'CreateContactCard'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(29137): error C2039: 'GetCommandBars': is not a member of 'Outlook::_Inspector'
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21536): note: see declaration of 'Outlook::_AppointmentItem::GetOrganizer'
1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(31671): error C2371: 'Outlook::_AppointmentItem::GetOrganizer': redefinition; different basic types
1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21536): note: see declaration of 'Outlook::_AppointmentItem::GetOrganizer'
任何帮助,如何解决这个问题?我需要添加任何参考或任何编译器选项吗?