开发者

VC++ LPTSTR Error

I am doing a project on firewall. I am not familiar very much with VC++. Though I am much sound in java and c#. But for my project sake I needed to create a dll. For what I exported 2 pre-written .h and .cpp files to my c++ project. But it is giving error on compile. Saying can not convert to LPTSTR etc. But it is compiling perfectly in the other project from where I fetch those files. Am I missing something? Please help.

Thanks.

ERRORS:

Code:

driverPath = (LPTSTR)malloc(strlen(path) + 1);

Error:

'strlen' : cannot convert parameter 1 from '开发者_StackOverflowLPCTSTR' to 'const char *'

Code:

strcpy(driverPath, path);

Error:

strcpy' : cannot convert parameter 1 from 'LPTSTR' to 'char *'


Your project configuration Character Set is probably set to Unicode. In the project settings, change your project configuration Character Set to Not Set or use const TCHAR * instead of const char *

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜