In Process or out of process 
Author Message
 In Process or out of process

I am maintaining a snippet of code where I am supposed to
be referencing an out of process ActiveX DLL.

Here is the relevant portion of the code

Sub Main()
    :
    :
    Dim oEstimate    As MMP_Server.Estimate

    :
    :
    Set oEstimate = CreateObject("MMP_Server.Estimate")

End Sub

Considering that the parameter is dimensioned as
an "object" within that DLL, does the CreateObject
statement still create that instance of the DLL out of
process or should I used the following Dim statement?

    Dim oEstimate    As Object

Would like to be able to recompile the DLL and not have to
recompile the Exe (as I am now forced to do because of the
reference).

Advice/Comments/directions to find information all
appreciated

Steve



Tue, 30 Dec 2003 06:37:55 GMT  
 In Process or out of process
Hi Steve,

ActiveX DLLs tend to be loaded in-process until you specify to load them
into a surrogate process, like COM+ does when you install a DLL as a server
package. As opposed to DLL, ActiveX EXE is always an out of process
component. The way variable is declared "As Object" or "As MyClass" does not
affect DLL process properties. It affects only the interface (IDispatch or
_MyClass) that will be used to call methods of your component.

You will have to recompile your client EXE every time you recompile your
server DLL because the binary compatibility option is not enabled in the
project properties of the server DLL. However when this option is enabled,
VB freezes all GUIDs and DISPIDs in server interfaces that keeps old clients
working with a new version of server.

"As MyClass" variable declaration is preferred because it works faster than
"As Object". On the other hand, it requeres binary compatibility option to
be enabled in a production environment.

Regards,
Dmitriy Zakharov.
Brainbench MVP for Visual Basic
http://www.brainbench.com


Quote:
> I am maintaining a snippet of code where I am supposed to
> be referencing an out of process ActiveX DLL.

> Here is the relevant portion of the code

> Sub Main()
>     :
>     :
>     Dim oEstimate    As MMP_Server.Estimate

>     :
>     :
>     Set oEstimate = CreateObject("MMP_Server.Estimate")

> End Sub

> Considering that the parameter is dimensioned as
> an "object" within that DLL, does the CreateObject
> statement still create that instance of the DLL out of
> process or should I used the following Dim statement?

>     Dim oEstimate    As Object

> Would like to be able to recompile the DLL and not have to
> recompile the Exe (as I am now forced to do because of the
> reference).

> Advice/Comments/directions to find information all
> appreciated

> Steve



Tue, 30 Dec 2003 16:37:49 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Installation process and Update process finished.

2. VCM, In-Process, Out-Process

3. How to hide my process from Process Liste with win XP

4. ActiveX exe used to process large processing jobs

5. in-process and out-process, what are they?

6. Processing during loop i.e. Application.Process Messages

7. Killing a process and all its children processes....

8. out of process server identifying client process

9. Q: Getting calling process from in-process server dll

10. What is in-process or out-process component?

11. Q: Getting calling process from in-process server dll

12. In-Process and Out-of-Process

 

 
Powered by phpBB® Forum Software