问题描述
大家好,我遇到了问题。
我正在将一些原生cpp代码移植到Windows Phone 8。
我的代码有一些由"typedef"定义的回调函数。使用时设置。
但是你知道,在c ++ / CX的公共方法中,本机c ++类型不能用作参数。
所以我必须得到一些方法来将外部回调函数传输到c ++ / CX。
我有一个想法,我想我可以将委托传输到C ++ / CX,并将代理转移到原生cpp的表单中的回调函数。但是我不知道如何实现它。
你能不能给我一些建议?
hello everyone, i have got a problem.
i'm transplanting some native cpp code to windows phone 8.
my code has some callback functions defined by "typedef" to be set when used.
but you know, the native c++ type cann't be used as a parameter in a public method in c++/CX.
so i must get some methods to transport the outside callback function to c++/CX.
I have an idea, I think I can transport a delegate to C++/CX, and transfered the delegate to the callback function in the form of native cpp. But I don't know how to achieve it.
Woud you please give me some suggestions?
这篇关于如何将回调函数传输到c ++ / CX?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!