|
#include <mshtml.h>
void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
IDispatch * Document;
Document = CppWebBrowser1->Document;
IHTMLElement* HTMLElement;
IHTMLDocument2* pHTMLDocument;
HRESULT hr;
WideString HTML; // <- w_char* 스트링입니다.
WideString Text;
hr = Document->QueryInterface(IID_IHTMLDocument2,(void**)&pHTMLDocument );
if ( hr == S_OK )
{
hr = pHTMLDocument->get_body(&HTMLElement);
if ( hr == S_OK )
{
HTMLElement->get_innerHTML(&HTML);
HTMLElement->get_innerText(&Text);
HTMLElement->Release();
}
pHTMLDocument->Release();
}
Memo1->Lines->Add(HTML);
Memo1->Lines->Add(Text);
}
resource 에 올라온 내용인데 ..
hr = Document->QueryInterface(IID_IHTMLDocument2,(void**)&pHTMLDocument );
에서 에러가 나내염 ㅠㅠ
Access violatoion at address 00401C6A in module 이라는 에러가 떠염 ㅠㅠ
IID_IHTMLDocument2,(void**)&pHTMLDocument <-- 여기에 이상한 값이 나오는데
여기에 형식이 틀렸나요 ? ^^;; 알려주세요~ ^^;
그럼 오늘도 좋은 하루 보내세요~ ^^
|