在哪里COM方法调用执行 [英] Where are COM method calls executed
问题描述
让我们说,我正在执行一个用c#编写的exe(只是我的语言选择)。它有以下代码:
Let's say, I am executing an exe written in c#(just my choice of language). It has the following piece of code:
var comObj=new ComClass();
comObj.DoSomething();
现在,我想知道 DoSomething
方法执行。是当前exe正在运行的同一进程还是不同的进程响应
DoSomething
调用?
推荐答案
有两种主要类型的服务器,进程内和进程外。进程内服务器在动态链接库(DLL)中实现,并且进程外服务器在可执行文件(EXE)中实现。进程外服务器可以位于本地计算机或远程计算机上。
There are two main types of servers, in-process and out-of-process. In-process servers are implemented in a dynamic linked library (DLL), and out-of-process servers are implemented in an executable file (EXE). Out-of-process servers can reside either on the local computer or on a remote computer.
我认为这些名称相当显式: - )
I do think that the names are quite explicit :-)
请注意,即使对于进程外的COM服务器,也会有一些进程中的代码在COM客户端和COM服务器
Note that even for out-of-process COM servers, there will be some code in-process that will do the marshaling between the COM client and the COM server
这篇关于在哪里COM方法调用执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!