我的c#代码是
namespace test
{
    public interface iHOL
    {
        bool teststru(out stru tru);
    }
    public struct stru
    {
       public bool bl;
        public byte msg;
    }    public class clstest:iHOL
    {
        public bool teststru(out stru tru)
        {
            tru.bl = true;
            tru.msg = 5;
            return true;
        }
    }请问在vb里调用teststru函数时 要怎样设置(out stru tru)这个参数?

解决方案 »

  1.   

    一样调用,添加引用后,自动会出现Stru这个struct的。
    貌似这与COM无关。
      

  2.   

    不行啊,会报错,
    在vb里 dim vbstruct as stru  这个时就会报错
      

  3.   

     需添加 using test ; 
      

  4.   

    Dim bef As stru   就报错了,,    报错说:Variable uses an AutoMation type not supported in Visual Basic 
      

  5.   

    dim bef as stru =new stru
      

  6.   


    报end of statement的错误啊
      

  7.   

    Dim obj As VCI_HOL_OBJ
    Set obj = New VCI_HOL_OBJ这样的话又报Invalid us of new keyword的错误