Hi All! I am trying to compile under VC++ (VS 2003) the event sink which imports: #import "dll\cdoex.dll" no_namespace rename("Folder","CDOFolder"), named_guids I have to enable wchar_t as built-in type for my UNICODE project compilation. The cdoex.tlh which is generated by compiler contains all cdo declarations in this way: .... const BSTR cdoBusy = (unsigned short*) L"Busy"; const BSTR cdoFree = (unsigned short*) L"Free"; .... This is the reason I get this error message on every const declaration: error C2440: 'initializing' : cannot convert from 'unsigned short *' to 'const BSTR' I can't import from cdoex.dll for UNICODE. How to resolve it? How to use cdoex.dll in import for UNICODE project with wchar_t ?
Hi, I have the exact same proble but with fxscomex.dll it gives me line const BSTR bstrGROUPNAME_ALLDEVICES = (unsigned short*) L"<All Devices>"; I read that if you remove the compiling directory (debug or release) and you recompile it should resolve the problem but it didn't work for me. did you find the answer ? Michel St-Louis tester wrote: > Hi All! > > I am trying to compile under VC++ (VS 2003) the event sink which imports: > #import "dll\cdoex.dll" no_namespace rename("Folder","CDOFolder"), named_guids > > I have to enable wchar_t as built-in type for my UNICODE project compilation. > > The cdoex.tlh which is generated by compiler contains all cdo declarations in > this way: > ... > const BSTR cdoBusy = (unsigned short*) L"Busy"; > const BSTR cdoFree = (unsigned short*) L"Free"; > ... > > This is the reason I get this error message on every const declaration: > error C2440: 'initializing' : cannot convert from 'unsigned short *' to > 'const BSTR' > I can't import from cdoex.dll for UNICODE. How to resolve it? > How to use cdoex.dll in import for UNICODE project with wchar_t ?