<br /> typedef HRESULT (WINAPI *AttachCtrl)(IUnknown*, HWND,IUnknown**);<br /> <br /> LRESULT CHookDlg::OnMouseLBDown( WPARAM, LPARAM lParam )<br /> {<br /> IWebBrowser2 *pIwb;<br /> OleInitialize( 0 );<br /> CoCreateInstance( CLSID_InternetExplorer, NULL, CLSCTX_SERVER,IID_IWebBrowser2, (void**)&pIwb );<br /> if( pIwb )<br /> {<br /> VARIANT vEmpty;<br /> VARIANT_BOOL bBusy = VARIANT_TRUE;<br /> VariantInit( &vEmpty );<br /> <br /> HINSTANCE hIEInstance = LoadLibrary( "atl.dll" );<br /> <br /> AttachCtrl AtlAxAttachControl = (AttachCtrl)GetProcAddress( hIEInstance, "AtlAxAttachControl" );<br /> <br /> AtlAxAttachControl( pIwb, ::GetForegroundWindow(), 0 );<br /> <br /> BSTR bufferScript;<br /> pIwb->get_LocationURL( &bufferScript );<br /> pIwb->get_Name( &bufferScript );<br /> pIwb->get_Path( &bufferScript );<br /> <br /> <br /> pIwb->Quit();<br /> pIwb->Release();<br /> <br /> FreeLibrary( hIEInstance );<br /> }<br /> <br /> return 0;<br /> }<br />
get_LocationURL
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)