comdef.h compiler error
- From: "PaulH" <paul.heil@xxxxxxxxx>
- Date: 1 Aug 2006 08:54:13 -0700
I have a VC++ project that I want to use a COM library in. So, I import
my COM dll with an absolute path (since it's in my VS project
directory) like this.
#import "C:\\...\\MyDLL.dll"
But, when I go to compile my project that uses that COM DLL, I get an
error in comdef.h. This error doesn't appear when I don't import, and I
have no trouble compiling and registering the DLL itself.
Error 1 error C2589: '(' : illegal token on right side of
'::' C:\...\comdef.h 240
Error 2 error C2059: syntax error : '::' C:\...\comdef.h 240
Error 3 fatal error C1903: unable to recover from previous error(s);
stopping compilation c:\...\windows mobile 5.0 pocket pc sdk
The actual comdef.h line is:
inline const TCHAR * _com_error::ErrorMessage() const throw()
{
if (m_pszMsg == NULL) {
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
m_hresult,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&m_pszMsg,
0,
NULL);
if (m_pszMsg != NULL) {
int nLen = ::lstrlen(m_pszMsg); //compiler error here!
//...
}
Is there a setting, or something I'm missing to get this to work that
anybody can see?
Thanks,
Paul H
.
- Follow-Ups:
- Re: comdef.h compiler error
- From: Paul G. Tobey [eMVP]
- Re: comdef.h compiler error
- From: PaulH
- Re: comdef.h compiler error
- Prev by Date: Re: Check Directories and files in storage card
- Next by Date: Re: comdef.h compiler error
- Previous by thread: Thread ID to handle
- Next by thread: Re: comdef.h compiler error
- Index(es):
Relevant Pages
|