I have an old application that I need to make a object call, using COM, to run a C#.NET application. I am having trouble finding an easy way to do it (I have not had any exposure to COM before now).
I have done a little bit of searching on the net and my collegue found a way to do it but it appears to only work on his machine. I think it may be something to do with the registrys
I basically need a seamless way of getting this C# app out with just the original app and the .NET framework. Can anyone help?
------------------
using System;
using System.Runtime.InteropServices;
using Firm_Contact;
namespace FirmContactCOM
{
[Guid("D6F88E95-8A27-4ae6-B6DE-0542A0FC7039")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface _FirmContact
{
[DispId(1)]
int GetFirmContact();
}
[Guid("13FE32AD-4BF8-495f-AB4D-6C61BD463EA4")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("FirmContactCOM.FirmContact")]
public class FirmContact : _FirmContact
{
public FirmContact(){}
public int GetFirmContact()
{
return(Firm_Contact.MainFirmContact.StartUp());
}
}
}