日期:2014-05-17 浏览次数:21013 次
namespace cs_ClassLibrary1
{
[Guid("154BD6A6-5AB8-4d7d-A343-0A68AB79470B")]
public interface MyCom_Interface
{
[DispId(1)]
int Add(int a, int b);
}
/*
[Guid("D11FEA37-AC57-4d39-9522-E49C4F9826BB"),
InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface MyCom_Events
{
}
*/
[Guid("2E3C7BAD-1051-4622-9C4C-215182C6BF58"),
ClassInterface(ClassInterfaceType.None)/*,
ComSourceInterfaces(typeof(MyCom_Events))*/
]
public class Class1 : MyCom_Interface
{
public int Add(int a, int b)
{
return a + b;
}
}
}