scripting/automation in .NET?

Hello,

  I have two questions about automation support in .NET, motivated by a project we are undertaking.

   We are planning to add scripting support for our application, which controls scientific equipment and analyzes the resulting data.  Our app is COM-based, implemented as in-proc servers written mostly in VC++, with the UI code mostly in C#.  We are leaning toward a solution based on Microsoft's automation recommendations, exposing a set of ActiveX objects that implement a programming model of our application.  This would immediately enable our clients to use VBScript/JScript and the WSH to write and execute scripts that automate our application.

  Although we are slowly migrating toward C# and away from C++, to create the automation server that would provide access to our Application object (the root of our model), we will use VC++, because there does not seem to be a way to implement an out-of-process COM server in C#.  (Although one can implement COM-callable objects in a C# .EXE, they are loaded in-process.  We want to put our server in the ROT, so that calls to GetObject will return the single instance.)

  So, my first question is:  does anyone know if Microsoft plans to add a way to implement a COM out-of-process server in C#

  My second question is:  does anyone know if Microsoft plans to implement an automation/scripting solution based on .NET objects, as opposed to COM/ActiveX

  Thanks in advance,

Phil Coveney




Answer this question

scripting/automation in .NET?

  • XP is self aware

    this is what remoting is.



  • John Dieter

    Not sure, but in response to the last question, I thought they were posting JScript.NET to fill this position.

  • V VICTOR

    Phil:

    In response to your first question about being able to create out-of-process servers in C#, I found a couple links you might be interested in.  Both point to the idea of using COM+ Enterprise Services as a work around in VC# .NET to using out-of-process servers found in unmanaged code.  These COM+ components are derived from System.EnterpriseServices.ServicedComponents.

    COM+ (a.k.a. MTS) components are created in DLLs.  However, they run under the wing of a DLLHOST.exe that you create with a custom name.  A host supports one or more DLLs.  I suppose in your case you could create a new host for each DLL / COM Server component.  This will give you the same affect as an out-of-process (outproc) server.

    I found the following supporting links:

    [Google - "Creating Out of Process COM Server C#"]

    create a COM+ component - it was "Re: EXE COM Server Possible in C# "
    http://www.dotnet247.com/247reference/msgs/39/195717.aspx

    COM+ and the .NET Framework
    Building a complete COM+ Server component using C# and .NET
    Gopalan Suresh Raj
    http://my.execpc.com/~gopalan/dotnet/complus/complus.net_accountmanager.html

    [/Google - "Creating Out of Process COM Server C#"]

    James M. Sigler, II
    Dallas, TX
    jmsigler2@hotmail.com

    P.S. You might ask the OLE/COM/DCOM/ActiveX/.NET Remoting Team, part of the Distributed Services Group at Microsoft for COMINFO.EXE.  This helps a lot in getting a snapshot of information related to the successful registration of your COM components.



  • scripting/automation in .NET?