If your program is not using Unicode as the default, then "char *" is the same thing as LPCTSTR; the compiler will see the same thing, the only difference is that the preprocessor replaces LPCTSTR with "char *".
Your program however is probably using Unicode as the default. If so, then you need to convert the non-Unicode "char *" string to a Unicode string. There are many ways to do that and the most convenient solution for you depends on what your program is already using. If your program is using MFC then there is a MFC solution. If your program is using the CLI (.Net) then there is a different solution using that. If your program uses the C++ standard classes (std namespace) then there is a solution using that. There is also a solution using the C runtime and anotehr using the Windows SDK.
What are the differences between these two function CA2W and A2W?
It is not usually a good practice to attach a question to an old post, especially if that post is (supposedly) answered.
A2W is form the old ATL 3.0 conversion facility; you should use CA2W from ATL 7.0. See
Note that the "answer"
LPCTSTR pszCharacterString = CA2W(pChar);
given in this thread is an incorrect usage of CA2W, because the temporary CA2W object is destroyed. This is explained in the above link.
David Wilkinson | Visual C++ MVP