佚名通过本文主要向大家介绍了
请问如何将回调函数指针传递到COM的Method中?等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 请问如何将回调函数指针传递到COM的Method中?
描述:
解决方案1:
描述:
如题
解决方案1:
正规的方式是使用接口。但如果你非要调回调的话,我认为也不是不可以。
前提是要在同一进程!传一个DWORD值(函数地址),然后把它强制转换成
函数指针。ASP开发也有client和server之分,如果你是想在server调用client
传过来的函数指针的话,那就别想了,用接口吧。如果是同一进程中,还可以
考虑考虑。
Connection Points (Visual C++ Concepts)
http://msdn.microsoft.com/library/en-us/vccore/html/_core_connection_points.asp
ATL Connection Points (Visual C++ Concepts)
http://msdn.microsoft.com/library/en-us/vccore/html/_atl_Connection_Points.asp