Re: Problem on string types

Marco <marco@xxxxxx> wrote in

I exported my CE 6 SDK and installed it on VS 2005.
I have this problem when I try to compile projects based on my
SDK: when it has to link funcions from my CE 6 library that use
LPCTSTR type, it doesn't work.
I read about the different types of string in Windows, but I
didn't find a way to convert a simple char * to a LPCTSTR type.
This last is only a way to solve the problem, perhaps there's also
a way to use LPCTSTR types directly within VS 2005 projects.

Windows CE APIs are UNICODE only.
You have to use UNICODE strings and not "char *" 8-bit ASCII strings.
If you include "tchar.h" you can use macros that will allow you to
write code that can be built in both ways.

Valter Minute
Training, support and development for Windows CE
(the reply address of this message is invalid)