성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
[정성태] 저렇게 조각 코드 말고, 실제로 재현이 되는 예제 프로젝트를 압...
[정성태] Modules 창(Ctrl+Shift+U)을 띄워서, 해당 Op...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
닷넷
.NET 3.0
.NET 3.5
.NET 4.0
VC++
개발 환경 구성
제품 소개
VS.NET IDE
Vista
Windows 7
Windows 8
Windows 서버
Team Foundation Server
IIS
디버깅 기술
Win32
64비트
오피스
웹
기타
Phone
부모글 보이기/감추기
내용
<span> <br /> <pre class='code'> Vista Compatibility Team Blog - Internet Explorer caches settings ; http://blogs.msdn.com/vistacompatteam/archive/2007/02/07/internet-explorer-caches-settings.aspx </pre> <br /> 방금 전의 토픽에서 "RestartManager"를 언급해 드렸는데요.<br /> 바로 이 예제에서 언급된 것입니다. <br /> <br /> IE 의 경우, 일부 설정 사항들을 캐쉬해놓고 있는데, 만약 그런 값들을 변경시켰다면 IE를 재시작해야만 반영이 된다고 합니다. 그럴 때 쓸 수 있는 방법으로 "RestartManager"를 제시하고 있습니다. 관련 코드까지 실어두어서 ^^ 도움이 되겠습니다. <br /> <br /> 아래는 똑같이 복사해 온 코드입니다.<br /> <br /> <br /> <pre class='code'> DWORD dwVal = ERROR_SUCCESS; DWORD dwSessionHandle = (DWORD)-1; WCHAR wszSessionKey[CCH_RM_SESSION_KEY+1]; UINT nProcInfo = 100; UINT nProcInfoNeeded; DWORD lpdwRebootReason = 0; //for demo purposes, hardcoded paths are used. DWORD nFiles = 2; LPWSTR rgsFiles[] = { L"c:\\program files\\internet explorer\\iexplore.exe", L"c:\\program files\\internet explorer\\ieuser.exe" }; RM_PROCESS_INFO *rgProcs = new RM_PROCESS_INFO[nProcInfo]; if (NULL == rgProcs) { dwVal = ERROR_NOT_ENOUGH_MEMORY; goto RM_END; } // Starting Session dwVal = RmStartSession(&dwSessionHandle, 0, wszSessionKey); if (ERROR_SUCCESS != dwVal) goto RM_END; // Register items dwVal = RmRegisterResources(dwSessionHandle, nFiles, (LPCWSTR*) rgsFiles, 0, NULL, 0, NULL); if (ERROR_SUCCESS != dwVal) goto RM_END; // Getting affected apps dwVal = RmGetList(dwSessionHandle, &nProcInfoNeeded, &nProcInfo, rgProcs, &lpdwRebootReason); if (ERROR_SUCCESS != dwVal) goto RM_END; // Apply filter to shutdown iexplore processes only dwVal = RmAddFilter(dwSessionHandle, (LPCWSTR) rgsFiles[1], NULL, NULL, RmNoShutdown); if (ERROR_SUCCESS != dwVal) goto RM_END; // Shutdown iexplore processes dwVal = RmShutdown(dwSessionHandle, 0, NULL); if (ERROR_SUCCESS != dwVal) goto RM_END; // Remove previous filter & apply filter to shutdown ieuser only dwVal = RmRemoveFilter(dwSessionHandle, (LPCWSTR) rgsFiles[1], NULL, NULL); if (ERROR_SUCCESS != dwVal) goto RM_END; dwVal = RmAddFilter(dwSessionHandle, (LPCWSTR) rgsFiles[0], NULL, NULL, RmNoShutdown); if (ERROR_SUCCESS != dwVal) goto RM_END; // Shutdown ieuser process dwVal = RmShutdown(dwSessionHandle, 0, NULL); if (ERROR_SUCCESS != dwVal) goto RM_END; // Remove filter applied to ieuser process dwVal = RmRemoveFilter(dwSessionHandle, (LPCWSTR) rgsFiles[0], NULL, NULL); if (ERROR_SUCCESS != dwVal) goto RM_END; // Apply filter to restart ieuser process only dwVal = RmAddFilter(dwSessionHandle, (LPCWSTR) rgsFiles[0], NULL, NULL, RmNoRestart); if (ERROR_SUCCESS != dwVal) goto RM_END; // Restart ieuser dwVal = RmRestart(dwSessionHandle, NULL, NULL); if (ERROR_SUCCESS != dwVal) goto RM_END; // Remove previous filter & add filter to restart iexplore only dwVal = RmRemoveFilter(dwSessionHandle, (LPCWSTR) rgsFiles[0], NULL, NULL); if (ERROR_SUCCESS != dwVal) goto RM_END; dwVal = RmAddFilter(dwSessionHandle, (LPCWSTR) rgsFiles[1], NULL, NULL, RmNoRestart); if (ERROR_SUCCESS != dwVal) goto RM_END; // Restart iexplore dwVal = RmRestart(dwSessionHandle, NULL, NULL); if (ERROR_SUCCESS != dwVal) goto RM_END; RM_END: if (NULL != rgProcs) delete [] rgProcs; // Clean up session if (-1 != dwSessionHandle) RmEndSession(dwSessionHandle); return dwVal; </pre> <br /><br /><hr /><span style='color: Maroon'>[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </span>
첨부파일
스팸 방지용 인증 번호
1323
(왼쪽의 숫자를 입력해야 합니다.)