第一个参数为LPWSTR servername, 我已经定义了 CString szIP("\\\\192.168.0.1");
USES_CONVERSION;
LPWSTR x =A2W(szIP);
但编译错误为cannot convert parameter 1 from 'unsigned short *' to 'char *'
为什么阿?
USES_CONVERSION;
LPWSTR x =A2W(szIP);
但编译错误为cannot convert parameter 1 from 'unsigned short *' to 'char *'
为什么阿?
i think,the first parameter should be type of (const char *) or LPTSTR,
so you try to direct pass (char *)szIP to it。
http://www.mvps.org/win32/network/nshe.cpp