【发布时间】:2011-02-15 07:35:00
【问题描述】:
目前,我的其他 cpp 文件中有此功能:
UINT32 functionHtml(const wchar_t *url)
{
WinHttpClient client(url);
client.SendHttpRequest();
wstring httpResponseHeader = client.GetHttpResponseHeader();
wstring httpResponse = client.GetHttpResponse();
writeToLog(httpResponse.c_str());
return 0;
}
我有另一个 cpp 文件,我想执行上述文件中的内容。这是另一个文件的代码:
HRESULT CButtonDemoBHO::onDocumentComplete(IDispatch *pDisp, VARIANT *vUrl){
ATLTRACE("CButtonDemoBHO::onDocumentComplete %S\n", vUrl->bstrVal);
// <---- i would like to call funtionHTML here or ..
if (isMainFrame(pDisp)){
m_normalPageLoad=false;
// <---- here..
MessageBox(m_hWnd, L"Main Document has completed loading", L"Document Complete", MB_OK);
return S_OK;
}
return S_OK;
}
我收到错误 C2065: 'url' : undeclared identifier。 需要帮助。
【问题讨论】:
标签: c++ visual-studio