Home > Software engineering >  VC6.0 use ATL baffled mistakes (atlconv. H), comment out is the error code
VC6.0 use ATL baffled mistakes (atlconv. H), comment out is the error code

Time:09-21

I use in VC6.0 altbase. H when compile
The inline LPTSTR OLE2T LPOLESTR (lp) {return lp. }//line error
Output information
Atlconv. H (128) : error C2440: 'return' : always convert from 'unsigned short *' to 'char *'
Types pointed to are unrelated; Conversion requires reinterpret_cast, C - style cast the or function - style cast

Me to build a project, as well as using VC6.0, only used when complete program COM programming altbase. H corresponding parts, but not an error, and can run normally!!!!! Masters encountered this kind of situation you have no, because the project of other modules are many, not all new construction, and it is always a problem, just began with altbase. The contents of the h, is originally wanted to use less than the definition of the block, ha ha, but seems doesn't work, please know warrior glad! Thank you ~

CodePudding user response:

The inline LPTSTR OLE2T LPOLESTR (lp) {return (LPTSTR) lp. }//line error

CodePudding user response:

Error prompt the context is?

CodePudding user response:

# include "atlconv. H"


# if defined (_UNICODE)
//in these cases, the default (TCHAR) is the same as OLECHAR
//...
The inline LPTSTR OLE2T LPOLESTR (lp) {return lp. }
# elif defined (OLE2ANSI)
//in these cases, the default (TCHAR) is the same as OLECHAR
The inline LPTSTR OLE2T LPOLESTR (lp) {return lp. }
# the else
# define OLE2T (lpo) W2A (lpo)
# endif

CodePudding user response:

ALT F7 see set project is unicode or multibyte set different TCHAR bits wide
  • Related