VC++ : saving a html page

S

Sachin

Hi,

I am trying to save a file using the following code.

MessageBox("Saving file","",MB_OK);
_Module.m_pWebBrowser->get_Document(&pDisp);

spHTMLDocument2 = pDisp;

IPersistFile* pFile = NULL;

if(SUCCEEDED(spHTMLDocument2->QueryInterface(IID_IPersistFile,
(void **)&pFile)))
{

// Ashish

if ((pFile->Save(L"c:\\593\\eclipse\\workspace\\pardom\\partitionDom\\files\\news\\urlName.htm",
FALSE)) == E_FAIL)

{

MessageBox("Unable to Save File", "", MB_OK);
}
}

/********/

MessageBox("Saved file","",MB_OK);
int a;

pDisp.Release();

a = pFile->Release();
MessageBox("Handle Released", "", MB_OK);
CloseHandle(hProcess);


if(a == 0)
MessageBox("Zero References to file","",MB_OK);

This code is used by a program that works on a html page.
I want the page to be saved while the prog is running but the saving
process doesnt ends untill i close the prog as a whole i.e i close
down the Internet explorer on which the program is running.

Please help.
 
V

Victor Bazarov

Sachin said:
I am trying to save a file using the following code.

MessageBox("Saving file","",MB_OK);[...]

You're in a wrong newsgroup. Your question has nothing to
do with C++ language and everything to do with interaction
of your program with Internet Explorer. You need to find
another newsgroup, like comp.infosystems.www.authoring.cgi
Besides, the code you posted is incomplete, so there is no
way to advise you on the ways to fix it. And this is not
an invitation to post your complete code. It's still OT.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,170
Messages
2,570,925
Members
47,464
Latest member
Bobbylenly

Latest Threads

Top