一个接口函数
myinterface(/*[in]*/ BSTR R1, /*[out]*/ BSTR* Error, /*[out, retval]*/ BSTR* ret)
{
    ....
    unsigned char myval[10];
    ....
    
}
问题1:ret如何得到myval[10]的值?即如何转换unsigned char myval[10]为BSTR?
问题2:在ASP中,如何得到Error的值?

解决方案 »

  1.   

    USES_CONVERSION;
    *ret=T2BSTR((LPCTSTR)(myval));Error同样处理
      

  2.   

    在ASP中,如何得到Error的值。ASP中可以引址调用吗?如何调用?
      

  3.   

    VBScript will pass parameters to a method by value if the argument's data type is NOT declared as a variant and the parameter is passed by reference if the argument's data type is declared as variant by the method. so modify your method as
    myinterface(/*[in]*/ BSTR R1, /*[out]*/ VARIANT* Error, /*[out, retval]*/ BSTR* ret)