Click here to Skip to main content
15,905,914 members
Home / Discussions / COM
   

COM

 
GeneralRe: IHTMLElement & put_innerHTML update problem Pin
Ceri16-Oct-03 3:03
Ceri16-Oct-03 3:03 
GeneralRe: IHTMLElement & put_innerHTML update problem Pin
Neville Franks16-Oct-03 9:16
Neville Franks16-Oct-03 9:16 
GeneralRe: IHTMLElement & put_innerHTML update problem Pin
Ceri16-Oct-03 21:15
Ceri16-Oct-03 21:15 
GeneralDCOM RPC vulnerability Pin
yeeck13-Oct-03 17:09
yeeck13-Oct-03 17:09 
GeneralRe: DCOM RPC vulnerability Pin
Mike Dimmick15-Oct-03 4:51
Mike Dimmick15-Oct-03 4:51 
Generalmigrate VB ocx to Visual C++ Pin
magin10-Oct-03 4:11
magin10-Oct-03 4:11 
GeneralRe: migrate VB ocx to Visual C++ Pin
Mike Dimmick10-Oct-03 13:41
Mike Dimmick10-Oct-03 13:41 
GeneralHELP: weird behavior HTMLFramesColletion2(?) Pin
Member 58548410-Oct-03 2:39
Member 58548410-Oct-03 2:39 
Hi!

I wrote a program which changes the source code of an HTML page in Internet Explorer.
If the page is inculding Frames i'm using the IHTMLFramesCollection2 to get the
source of the frames.

This works except the frame is on an external URL:

Program works:
<FRAME name=menu src=menu.html>
<FRAME name=main src=main.html>

Program fails:
<FRAME name=menu src=http://www.somewhere.com/menu.html> ... fails here
<FRAME name=main src=main.html>

...but in my opinion it should work.
had somebody the same problem and maybe a resultion?

I'm using VC++ 6.0.

Here's some code:

int CpWToolBar::DoWorkOnFrames(IHTMLDocument2 *pDoc, SpWPIN pin)
{
int hr;

IHTMLWindow2* pWindow2 = NULL;
IHTMLWindow2* pFrameWindow2 = NULL;
IHTMLDocument2* pFrameDoc = NULL;
IHTMLFramesCollection2* pFrameColl = NULL;

long cFrames;

hr = pDoc->get_parentWindow(&pWindow2);
assert(SUCCEEDED(hr) && pWindow2);

pWindow2->get_frames(&pFrameColl);

if (SUCCEEDED(hr = pFrameColl->get_length( &cFrames )))
{
for ( int i=0; i < cFrames ; i++ )
{
VARIANT vIndex;
vIndex.vt = VT_UINT;
vIndex.lVal = i;
VARIANT var2 = { 0 };
LPDISPATCH pDisp;
VARIANT frame;

if (SUCCEEDED(hr = pFrameColl->item( &vIndex, &frame ))){
hr = frame.pdispVal->QueryInterface(IID_IHTMLWindow2, (void**)&pFrameWindow2);
hr = pFrameWindow2->get_document(&pFrameDoc);
if (pFrameDoc)
{
changeHTML(pFrameDoc, pin);
DoWorkOnFrames(pFrameDoc, pin);
}
}

}
}
return S_OK;
}


regards Alex

QuestionHow to get the IE container's HWND? Pin
Member 6334809-Oct-03 17:24
Member 6334809-Oct-03 17:24 
AnswerRe: How to get the IE container's HWND? Pin
Member 6334809-Oct-03 17:37
Member 6334809-Oct-03 17:37 
QuestionIs that possible use ActiveX get system info and give it to JScript? Pin
Anonymous9-Oct-03 9:30
Anonymous9-Oct-03 9:30 
AnswerRe: Is that possible use ActiveX get system info and give it to JScript? Pin
Heath Stewart16-Oct-03 11:32
protectorHeath Stewart16-Oct-03 11:32 
GeneralDesperate help with Windows Media Format SDK Pin
Emiliano9-Oct-03 5:24
Emiliano9-Oct-03 5:24 
Generalhelp with activex and vb.net Pin
Mithun_Patel9-Oct-03 4:33
Mithun_Patel9-Oct-03 4:33 
Generalhelp!!!!!!!!!!!!! Pin
Mithun_Patel9-Oct-03 4:32
Mithun_Patel9-Oct-03 4:32 
GeneralIs it possible for a client application to inherit COM classes Pin
siepaoling7-Oct-03 6:00
siepaoling7-Oct-03 6:00 
GeneralUsing existing running programs instead of creating new ones Pin
jparsons6-Oct-03 5:45
jparsons6-Oct-03 5:45 
GeneralRe: Using existing running programs instead of creating new ones Pin
valikac6-Oct-03 5:54
valikac6-Oct-03 5:54 
GeneralRe: Using existing running programs instead of creating new ones Pin
Vi27-Oct-03 1:19
Vi27-Oct-03 1:19 
GeneralRe: Using existing running programs instead of creating new ones Pin
jparsons8-Oct-03 12:10
jparsons8-Oct-03 12:10 
GeneralRe: Using existing running programs instead of creating new ones Pin
Vi210-Oct-03 3:36
Vi210-Oct-03 3:36 
QuestionHow Adobe ActiveX Control is activated when We drop *.pdf file in Browser Pin
Umesh Kr. Sharma6-Oct-03 5:44
Umesh Kr. Sharma6-Oct-03 5:44 
AnswerRe: How Adobe ActiveX Control is activated when We drop *.pdf file in Browser Pin
Ernest Laurentin6-Oct-03 7:34
Ernest Laurentin6-Oct-03 7:34 
GeneralRe: How Adobe ActiveX Control is activated when We drop *.pdf file in Browser Pin
Umesh Kr. Sharma7-Oct-03 1:12
Umesh Kr. Sharma7-Oct-03 1:12 
GeneralRe: How Adobe ActiveX Control is activated when We drop *.pdf file in Browser Pin
igor196017-Oct-03 12:52
igor196017-Oct-03 12:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.