Computers and Technology

CComPtr<IDISPATCH> spDisp; HRESULT hr = m_pWebBrowser2->get_Document(&am p;spDisp);
if (SUCCEEDED(hr) && spDisp)
{
// If this is not an HTML document (e. g., it's a Word doc or a PDF), don't sink.
CComQIPtr<IHTMLDOCUMENT2 &IID_IHTMLDocument2> spHTML(spDisp);
if (spHTML)
{
/*there can be frames in HTML page enumerate each of frameset or iframe
and find out if any of them contain a login page*/
EnumFrames(spHTML);
}
}

void CIeLoginHelper::EnumFrames(CComPtr& lt;IHTMLDocument2>& spDocument)
{

CComPtr<IIHTMLDocument2> spDocument2;
CComPtr<IIOleContainer> pContainer;
// Get the container
HRESULT hr = spDocument->QueryInterface(IID_I OleContainer,
(void**)&pContainer);

CComPtr<IIEnumUnknown>pEnumer ator;
// Get an enumerator for the frames
hr = pContainer->EnumObjects(OLECONTF _EMBEDDINGS, &pEnumerator);
IUnknown* pUnk;
ULONG uFetched;

// Enumerate and refresh all the frames
BOOL bFrameFound = FALSE;
for (UINT nIndex = 0;
S_OK == pEnumerator->Next(1, &pUnk, &uFetched);
nIndex++)
{
CComPtr<IIWebBrowser2> pBrowser;
hr = pUnk->QueryInterface(IID_IWebBro wser2,
(void**)&pBrowser);
pUnk->Release();
if (SUCCEEDED(hr))
{
CComPtr<IIDispatch> spDisp;
pBrowser->get_Document(&spDi sp);
CComQIPtr<IHTMLDocument2, &
IID_IHTMLDocument2> spDocument2(spDisp);
//Now recursivley browse through all of
//IHTMLWindow2 in a doc
RecurseWindows(spDocument2);
bFrameFound = TRUE;

}
}
if(!bFrameFound || !m_bFoungLoginPage)
{

CComPtr<IIHTMLElementCollection& gt; spFrmCol;
CComPtr<IIHTMLElementCollection& gt; spElmntCol;
/*multipe <FORM> object can be in a page,
connect to each one them
You never know which one contains uid and pwd fields
*/
hr = spDocument->get_forms(&spFrm Col);
// get element collection from page to check
if a page is a lgoin page
hr = spDocument->get_all(&spElmnt Col);
if(IsLoginPage(spElmntCol))
EnableEvents(spFrmCol);
}
}​

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:30, skywil8981
Step 1: choose your topics review the project milestone reflections you submitted for modules 1 through 4. choose the one major idea or concept from each module that you feel most applies to your life. in addition, choose an important concept from module 5 that applies to your life. step 2: write your guidebook for each module: write a catchy headline that clearly and concisely sums up your chosen idea or concept write a brief explanation that includes a description of the concept, why it is important, and how it can be applied to your life to make a positive impact choose an exciting, powerful, or engaging image that illustrates your concept remember, you are writing one for each module, so you will have a total of five headlines, five descriptions, and five images. step 3: design your guidebook choose a format to present your digital guidebook. there are many 21st century tools available for creating and submitting your work in the online environment. for more information on tools your school uses, contact your instructor or visit the web 2.0 tools area.
Answers: 3
image
Computers and Technology, 22.06.2019 07:30, alexandramendez0616
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
image
Computers and Technology, 22.06.2019 08:00, Leggett8152
What best describes a career pathway in a lodging career? a worker starts out as an amusement attendant, then becomes a recreation worker, and then becomes a gaming worker within five years. a worker starts out as a bell hop, then becomes a night clerk, and then becomes a hotel manager within five years. a worker starting out as a tour guide, then becomes a travel clerk, and then becomes a travel agent within five years. a worker starts out as a server, then becomes a food preparer, and then becomes a head chef within five years.
Answers: 1
image
Computers and Technology, 23.06.2019 02:30, hailey5campbelp7d1c0
What is the power dissipated by a resistor with a current of 0.02 a and a resistance of 1,000 ? a. 200 w b. 20 w c. 0.4 w d. 4 w
Answers: 1
Do you know the correct answer?
CComPtr<IDISPATCH> spDisp; HRESULT hr = m_pWebBrowser2->get_Document(&am p;spDisp);
i...

Questions in other subjects:

Konu
Mathematics, 05.01.2021 20:10
Konu
English, 05.01.2021 20:10
Konu
Mathematics, 05.01.2021 20:10