Cabadam
January 24th, 2002, 12:43 AM
OK... I had a program (originally written using VC 6.0) that, as part of its
function, retrieves values from an open Internet Explorer window. However,
when I compile the SAME EXACT code that works in VC6 in VS.NET, the retrieve
function fails.
In the code, once I get the IE window, I check for frames:
IDispatchPtr dis;
IHTMLDocument2Ptr doc;
spBrowser->get_Document(&dis); //spBrowser is earlier declared and
initialized
dis->QueryInterface(&doc);
IHTMLFramesCollection2* frames;
long num;
doc->get_frames(&frames); /* THIS IS THE PROBLEM
if (frames == NULL)
///failed
else
{
....
}
In VC6, the get_frames function returns a valid address everytime, whether
it is a framesize of 1, or 2 or whatever...
However, the thing compiled in VS.NET, 'frames' ALWAYS ends up NULL.
What would cause this?
I am using the VS.net Beta 2. Is this a known problem that is fixed in the
final release? Is there a solution??
Or is the problem something else entirely?
This was tested and confirmed using both IE5.5 and IE6.
Thanks!
Adam
cabadam@houston.rr.com
function, retrieves values from an open Internet Explorer window. However,
when I compile the SAME EXACT code that works in VC6 in VS.NET, the retrieve
function fails.
In the code, once I get the IE window, I check for frames:
IDispatchPtr dis;
IHTMLDocument2Ptr doc;
spBrowser->get_Document(&dis); //spBrowser is earlier declared and
initialized
dis->QueryInterface(&doc);
IHTMLFramesCollection2* frames;
long num;
doc->get_frames(&frames); /* THIS IS THE PROBLEM
if (frames == NULL)
///failed
else
{
....
}
In VC6, the get_frames function returns a valid address everytime, whether
it is a framesize of 1, or 2 or whatever...
However, the thing compiled in VS.NET, 'frames' ALWAYS ends up NULL.
What would cause this?
I am using the VS.net Beta 2. Is this a known problem that is fixed in the
final release? Is there a solution??
Or is the problem something else entirely?
This was tested and confirmed using both IE5.5 and IE6.
Thanks!
Adam
cabadam@houston.rr.com