字符串类型串换和InternetCrackUrl的疑惑?
drmy 2005-05-29 01:32:37 我现在必须调用API的InternetCrackUrl这个函数,但是这个函数的第一个参数url类型是LPCWSTR。
可是我要传入的url是STL中的string类型,我用url.c_str()作为参数传进去,但是编译会报告错误:
error C2664: 'InternetCanonicalizeUrlW' : cannot convert parameter 1 from 'const char *' to 'const unsigned short *'
请问我改怎么把STL的string类型变量串换成可以传入的类型?
多谢了!