Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/146.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何将Internet Explorer的扩展创建为Exe Com服务器?_C++_Visual Studio 2010_Com_Atl_Bho - Fatal编程技术网

C++ 如何将Internet Explorer的扩展创建为Exe Com服务器?

C++ 如何将Internet Explorer的扩展创建为Exe Com服务器?,c++,visual-studio-2010,com,atl,bho,C++,Visual Studio 2010,Com,Atl,Bho,我需要为Internet Explorer创建一个扩展,我需要它是EXE Com服务器。 首先,我使用ATL向导创建了一个简单的COM DLL项目,如前所述,它工作得很好,即加载了我的扩展,并显示了我的消息框。接下来,我重复了所有这些步骤,但创建了COM EXE项目。我以同样的方式注册了它,Internet Explorer可以看到扩展,但它不工作。未调用我的函数IObjectWithSite::SetSite和IObjectWithSite::GetSite。您能告诉我如何解决这个问题吗?您不

我需要为Internet Explorer创建一个扩展,我需要它是EXE Com服务器。
首先,我使用ATL向导创建了一个简单的COM DLL项目,如前所述,它工作得很好,即加载了我的扩展,并显示了我的消息框。接下来,我重复了所有这些步骤,但创建了COM EXE项目。我以同样的方式注册了它,Internet Explorer可以看到扩展,但它不工作。未调用我的函数IObjectWithSite::SetSite和IObjectWithSite::GetSite。您能告诉我如何解决这个问题吗?

您不能在Process COM server之外注册为BHO,但您可以从BHO呼叫COM server。例如,您可以使用后期绑定:

ccomdip服务器;
if(成功(pServer.CoCreateInstance(CLSID_YourComServer)){
pServer.Invoke0(L“ServerMethodName”);
}

确保已为项目生成并注册代理存根dll(使用您的serverps.dll名称自动生成的项目).

您的设置无法与感染计算机的病毒区分开来。您无法说服IE开始与进程外服务器对话,因为它没有任何方法对其进行沙箱处理。BHO必须是进程内的,严格要求。