要调试浏览器的插件(BHO),常见的方法是先设置下面的注册表值:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"TabProcGrowth"=dword:00000000

但是在64bit系统下的Internet Explorer 10中,设置TabProcGrowth=0之后会导致浏览器的32bit插件(BHO)不能加载。
详见:http://support.microsoft.com/kb/2716529/en-us

要单步调试时,只能编译为64bit版本了。

TabProcGrowth的作用详解:

http://blogs.msdn.com/b/askie/archive/2009/03/09/opening-a-new-tab-may-launch-a-new-process-with-internet-explorer-8-0.aspx

摘录如下:

HKCU\Software\Microsoft\Internet Explorer\Main - TabProcGrowth (string or dword)

Tab Process Growth : Sets the rate at which IE creates New Tab processes.  

There are two algorithms used by Internet Explorer:

1. Context-based: By default, the context-based algorithm is used and the curve is chosen based on the amount of physical memory on the machine. In addition, the TabProcGrowth string registry value may be manually forced to:

  a) small: Maximum 5 tab processes in a logon session, requires 15 tabs to get the 3rd tab process.

  b) medium: Maximum 9 tab processes in a logon session, requires 17 tabs to get the 5th tab process.

  c) large: Maximum 16 tab processes in a logon session, requires 21 tabs to get the 9th tab process.

2. The "Max-Number" algorithm: This specifies the maximum number of tab processes that may be executed for a single isolation session for a single frame process at a specific mandatory integrity level (MIC). Relative values are:

  a) TabProcGrowth=0 : tabs and frames run within the same process; frames are not unified across MIC levels. 

  b) TabProcGrowth =1: all tabs for a given frame process run in a single tab process for a given MIC level.

  Note: On Terminal Server, the default value is the integer of 1.

  c) TabProcGrowth >1: multiple tab processes will be used to execute the tabs at a given MIC level for a single frame process. In general, new processes are created until the TabProcGrowth number is met, and then tabs are load balanced across the tab processes.

  Note: that the frame process is no longer allowed to execute at low-MIC. If this is attempted, the process will exit.


本文链接地址: 在IE10中调试BHO无法进入断点
https://blog.qingfengju.com/index.asp?id=355

分类:Win32/C++ 查看次数:10826 发布时间:2013/10/31 10:26:29

// CCRC 是 IBM Rational ClearCase Remote Client 的缩写

// 编译选项:
// cl ccrc_cleardiffmrg.cpp /link user32.lib

// 使用方法:
// 复制ccrc_cleardiffmrg.exe到下面的目录(注意先备份以前的):
// D:\Program Files\CCRC7.1\CCRC\plugins\com.ibm.rational.clearcase.compare_merge.win32.x86_7.0.1.D061004

#include <stdio.h>
#include <string.h>
#include <windows.h>

int main(int argc,char* argv[])
{
    /*
    记录CCRC传递给ccrc_cleardiffmrg.exe的参数:
    -----------------------------------------
    FILE *f=fopen("ccrc.txt","w+");

    int i=0;
    for(;i<argc;i++)
    {
        fwrite(argv[i],strlen(argv[i]),1,f);
        fwrite("\n",strlen("\n"),1,f);
    }

    fclose(f);

    D:/Program Files/CCRC7.1/CCRC/plugins/com.ibm.rational.clearcase.compare_merge.win32.x86_7.0.1.D061004/ccrc_cleardiffmrg.exe
    -fname
    test.py@@/main/xxxx/7
    -fname
    test.py@@/main/xxxx/8
    test.py.compare.0
    test.py
    */

    char szCmdLine[1024];
    sprintf(szCmdLine,"\"D:\\Program Files\\WinMerge\\WinMergeU.exe\" \"%s\" \"%s\"",argv[argc-1],argv[argc-2]);

    STARTUPINFO si;
    ZeroMemory( &si, sizeof(si) );
    si.cb = sizeof(si);
   
    PROCESS_INFORMATION pi;
    ZeroMemory( &pi, sizeof(pi) );

    if( !CreateProcess(NULL,szCmdLine,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi ))
    {
        MessageBox( 0,"Create WinMergeU.exe Process failed.","Error",MB_ICONWARNING );
        return -1;
    }

    WaitForSingleObject( pi.hProcess, INFINITE );

    CloseHandle( pi.hProcess );
    CloseHandle( pi.hThread );

    return 0;
}

 


本文链接地址: 替换CCRC的对比工具为WinMerge
https://blog.qingfengju.com/index.asp?id=354

分类:Win32/C++ 查看次数:5682 发布时间:2013/10/28 21:27:06