문제점이 하나 생겼는데요,
먼저, 인터넷 익스플로러에서는 아래와 같은 방법으로 쿠키를 얻게 되잖아요?
Code: Select all
// Get IOleClientSite interface pointer.
LPOLECLIENTSITE pIClientSite = GetClientSite();
// Get IOleContainer interface poineter.
hr = pIClientSite->GetContainer(&pIContainer);
if (hr != S_OK)
{
pIClientSite->Release();
return FALSE;
}
// Get IServiceProvider interface pointer.
hr = pIClientSite->QueryInterface(IID_IServiceProvider, (void **)&pISP);
if (hr != S_OK)
{
pIContainer->Release();
pIClientSite->Release();
return FALSE;
}
// Get IWebBrowser2 interface pointer.
hr = pISP->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2,(void**)&pIWeb);
if (hr != S_OK)
{
pIContainer->Release();
pIClientSite->Release();
pISP->Release();
return FALSE;
}
// release interface.
pIContainer->Release();
pIClientSite->Release();
pISP->Release();
IDispatch *pHtmlDocDispatch = NULL;
IHTMLDocument2 *pHtmlDoc = NULL;
// Retrieve the document object.
hr = pIWeb->get_Document (&pHtmlDocDispatch);
if (SUCCEEDED (hr) && (pHtmlDocDispatch != NULL))
{
hr = pHtmlDocDispatch->QueryInterface (IID_IHTMLDocument2, (void**)&pHtmlDoc);
if (SUCCEEDED (hr) && (pHtmlDoc != NULL))
{
BSTR bstrCookies;
pHtmlDoc->get_cookie(&bstrCookies);
strResult = bstrCookies;
SysFreeString(bstrCookies);
pHtmlDoc->Release();
pIWeb->Release();
}
pHtmlDocDispatch->Release();
}
도저히 자료를 찾을 수 없네요.
혹시 예제소스나 방법을 좀 상세히 알려주실 수 있는분 계신가요?