关于用C#建立COM的问题,给出答案力马给100分
pijh 2002-12-13 09:19:21 用VB调用时总是出错,为什么?
using System;
using System.Runtime .InteropServices ;
namespace textcom1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
[Guid("5F99DD3D-FFC7-4bc3-A4C4-88DEAB431AD1")]
public interface text_Interface
{
string getname(string a );
}
[Guid("8BAE3195-03E6-40de-8683-4285AC3F7C03"),InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface text_Events
{
}
[Guid("21D73148-55D4-4a3a-8BD1-2433C0580EF3"),ClassInterface(ClassInterfaceType.None),ComSourceInterfaces(typeof(text_Events))]
public class textcom:text_Interface
{
public textcom()
{
}
public string getname (string a)
{
return a;
}
}
}