日期:2014-05-18  浏览次数:21212 次

想知道inData往里传什么样子的值?MarshalAs(UnmanagedType.BStr)
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)]
  public virtual extern void SetData(int inType, int inColor, [MarshalAs(UnmanagedType.BStr)] string inData);

想知道inData往里传什么样子的值?

------解决方案--------------------
传什么值根据方法的需要啊,UnmanagedType.BStr 只是约定参数封送方式,E_FAIL 多半是你值内容不对,跟格式无关