我试图创建只是一个简单的XLL文件,但我不能 我已经按照在MSDN网站 http://support.microsoft.com/kb/178474 的教程,但本教程是为Microsoft Excel 97开发工具包,我只是有版本2007 的Visual Studio 2005中,所以这也许是什么导致错误:如何为excel创建一个xll?
1>------ Build started: Project: Anewxll, Configuration: Debug Win32 ------
1>Compiling...
1>Anewxll.cpp
1>c:\nam\test\anewxll\anewxll\anewxll.cpp(97) : error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(5031): could be 'int AfxMessageBox(LPCTSTR,UINT,UINT)'
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(5033): or 'int AfxMessageBox(UINT,UINT,UINT)'
1> while trying to match the argument list '(const char [21], long)'
1>c:\nam\test\anewxll\anewxll\anewxll.cpp(140) : error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(5031): could be 'int AfxMessageBox(LPCTSTR,UINT,UINT)'
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(5033): or 'int AfxMessageBox(UINT,UINT,UINT)'
1> while trying to match the argument list '(char [8192], long)'
1>c:\nam\test\anewxll\anewxll\anewxll.cpp(174) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [14]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
更新的文档和SDK http://msdn.microsoft.com/en-us/library/aa730920%28v=office.12%29.aspx – 2011-04-21 15:55:30