MFC:将记录集的variant_array从mfc传递给python [英] MFC: Pass variant_array of recordset from mfc to python

查看:207
本文介绍了MFC:将记录集的variant_array从mfc传递给python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个应用程序,在其中我从python调用了C ++函数.现在我有一个问题,我想将记录集的变体数组从C ++返回到python.

如何将记录集的变体数组转换为等效的python数据类型?

I created application in which i call C++ functions from python. Now I have problem i want to return variant array of recordset from C++ to python.

How can I convert a variant array of recordset to python equivalent datatype?

推荐答案

考虑使用 ^ ]通过数组跨越边界.将safearray打包并从C ++代码返回后,即可将其用作Python中的默认数组操作.Python会将所有SafeArray转换为 ^ ].
Consider using SAFEARRAY[^] to pass the array across boundaries. Once the safearray is packed and returned from C++ code, you use it as the default array manipulation in Python.Python converts all SafeArrays to tuples[^] automatically.


这篇关于MFC:将记录集的variant_array从mfc传递给python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆