The main problem that I am having is that after registering the COM+ object,
I cannot seem to see it in the list of objects that is being displayed when
you run DCOMCNFG.
I am developing this object for a third party, and they say that I must be
able to see it in DCOMCNFG for them to be able to use it, the sample code is
below:
using System;
using System.Runtime.InteropServices;
using System.EnterpriseServices;
[assembly: AssemblyTitle("ComDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("..\\..\\comkey.snk")]
[assembly: AssemblyKeyName("")]
[assembly: ApplicationName("ComDemo")]
[assembly: Description("A coms demo")]
[assembly: ApplicationActivation(ActivationOption.Server)]
namespace ComDemo
{
public interface IComDemo
{
void AddItem(int iIn, ref String sOut, ref int iOut, ref int
iResult);
}
/// <summary>
/// Summary description for Class1.
/// </summary>
public class ComDemo : ServicedComponent
{
public void AddItem(int iIn, ref String sOut, ref int iOut, ref int
iResult)
{
sOut = "Bob the builder";
iOut = iIn++;
iResult = 6401;
}
}
}
Once compiled, i use the regsvcs util to register it with COM+.
Thanks for your help.
Paul
Rob Windsor said:
Perhaps you could give an example of a component you've created and the
exact problems you've been had attempting to access it through DCOM.
--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
Paul van't Klooster said:
Hi,
I have a situation where I need to register a COM/COM+ object that I have
written in C# as DCOM.
I have no problems creating COM or COM+ classes using C#, but I have not
been successful in trying to create a class that is accessible through DCOM.
Is anyone able to help me with this one.
Thanks
Paul