首页 新闻 赞助 找找看

c++/cli中out参数如何表示?

0
悬赏园豆:10 [待解决问题]

比如,在组件中的一个方法是这样写的 func(type* i, type* j,type** k);其中k在idl中定义为[out]。用c++/cli做时,要怎么写?是func(type^ i, type^ j,type^% k)这么写?还是func(type^ i, type^ j,[out]type^% k)这么写 ?还是func(type^ i, type^ j,type[System::Runtime::InteropServices::OutAttribute]^% k).刚开始学这个,很多东西都搞不懂。System::Runtime::InteropServices::OutAttribute这个是干什么的? MSDN里的解释没太看明白。

问题补充: System::Runtime::InteropServices::OutAttribute的使用是否要依赖于COM组件?
lockforme的主页 lockforme | 初学一级 | 园豆:190
提问于:2010-12-26 15:43
< >
分享
所有回答(1)
0

void foo([Out] Bar^% x);

Pony440 | 园豆:204 (菜鸟二级) | 2016-10-17 14:21
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册