佚名通过本文主要向大家介绍了紧急救助,9958儿童紧急救助,紧急救助电影,紧急救助员,非紧急救助服务中心等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 紧急救助:com字符串转换问题和ASP调用问题?
描述:
解决方案1:
描述:
一个接口函数
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:
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)