실행 중인 IE의 리스트 얻는 방법
Connecting to Running Instances of Internet Explorer
#import "mshtml.tlb": // Internet Explorer 5
#import "shdocvw.dll"
void CIEEnumWindowsDlg::ConnectToShell()
{
CoInitialize(NULL);
if(m_spSHWinds == 0) {
//
// Get reference to ShellWindows interface
//
if(
m_spSHWinds.CreateInstance(
__uuidof(SHDocVw::ShellWindows)
)
== S_OK) {
// Event Sink
//
LPCONNECTIONPOINTCONTAINER pConnPtCont;
if ((m_spSHWinds != NULL) &&
SUCCEEDED(
m_spSHWinds->QueryInterface(
IID_IConnectionPointContainer,
(LPVOID*)&pConnPtCont)
)
)
{
ASSERT(pConnPtCont != NULL);
LPCONNECTIONPOINT pConnPt = NULL;
DWORD dwCookie = 0;
if (SUCCEEDED(
pConnPtCont->FindConnectionPoint(
__uuidof(SHDocVw::DShellWindowsEvents),
&pConnPt)
)
)
{
ASSERT(pConnPt != NULL);
pConnPt->Advise(
this->GetIDispatch(FALSE),
&dwCookie);
pConnPt->Release();
}
pConnPtCont->Release();
}
}
else
{
AfxMessageBox("Shell Windows interface is not avilable");
}
}
}
'NIght.. > ATL+WTL+COM' 카테고리의 다른 글
| WebBrowser 로 부터 키보드 메세지 가로채기 (0) | 2008/12/11 |
|---|---|
| About the Browser (0) | 2008/12/03 |
| 실행 중인 IE의 리스트 얻는 방법 (0) | 2008/12/02 |
| Web Browser 컨트롤이 종료 될 때 이벤트 (0) | 2008/12/02 |
| IExplore 의 로딩 완료시점 알아내기 (0) | 2008/12/02 |
| 자바함수 호출 예제 - 4 (0) | 2008/11/13 |





CSS