2
LPCWSTR location_url;
m_spWebBrowser->get_LocationURL((BSTR*)&location_url);

我如何LPCWSTRconst char *in进行比较strstr

例子:

if(strstr((location_url, ".html"))
4

1 回答 1

5

您也可以将目标扩展设为宽字符串并使用wcsstr

wchar_t* ext = L".html";
if (wcsstr(location_url, ext))
于 2012-11-06T11:11:18.187 回答