Welcome![Sign In][Sign Up]
Location:
Search - 不定长结构数组

Search list

[ActiveX/DCOM/ATLVC下利用COM传递不定长结构数组(非Variant)

Description: Variant变量可以在COM/DCOM接口方法中传递(传入、传出)不定长结构数组,但是需要打包和解包,效率比较低。这个例子使用了size_is指定长度的方法,本是从MSDN上看到的,但是MSDN上给出的例子不够具体,所以费了些时间摸索,最后试通,给刚接触COM的朋友分享(老家伙们可以直接无视)。本例子由于是工作需要做得试验程序,因此其中存在少量冗余代码,大家注意一下就行了,还有,减少传递的参数个数时,所传递的实时(随机模拟)数据只是减了最后一个(没有减去相对应的),这个Bug不妨碍大局,因此存留,虽然Server支持DCOM,但是Client需要在本地运行,如果想Remote,稍微修改一下既可。
Platform: | Size: 358855 | Author: seaskyfox | Hits:

[ActiveX/DCOM/ATLDataTransfer_DCOM

Description: Variant变量可以在COM/DCOM接口方法中传递(传入、传出)不定长结构数组,但是需要打包和解包,效率比较低。这个例子使用了size_is指定长度的方法,本是从MSDN上看到的,但是MSDN上给出的例子不够具体,所以费了些时间摸索,最后试通,给刚接触COM的朋友分享(老家伙们可以直接无视)。本例子由于是工作需要做得试验程序,因此其中存在少量冗余代码,大家注意一下就行了,还有,减少传递的参数个数时,所传递的实时(随机模拟)数据只是减了最后一个(没有减去相对应的),这个Bug不妨碍大局,因此存留,虽然Server支持DCOM,但是Client需要在本地运行,如果想Remote,稍微修改一下既可。-Variant variables can be in the COM/DCOM interface method of delivery (incoming, outgoing) variable-length array of structures, but it needs to be packaged reconciliation package, the efficiency is relatively low. This example uses the method size_is specified length, this is seen from the MSDN, but the example given on MSDN is not specific enough, it took some time to explore, the final test pass, to a friend new to COM sharing (the old guy They can ignore). This example needs to be done because it is the work of testing procedures, and therefore, there is a small amount of redundant code, we take note of the line, and also to reduce the number of parameters passed when the transmission of real-time (stochastic simulation) data only by the last one (No less opposite page), this Bug is without prejudice to the overall situation, therefore retained, although the Server supports DCOM, but the Client needs to run locally, if you want Remote, a little change it can.
Platform: | Size: 358400 | Author: seaskyfox | Hits:

CodeBus www.codebus.net