SafeArrayGetElement函数返回的void指针可以转换为C ++类型吗? [英] Can the void pointer returned by SafeArrayGetElement function be casted into a C++ type?

查看:134
本文介绍了SafeArrayGetElement函数返回的void指针可以转换为C ++类型吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个类来简化sql server上的数据库查询ce我的代码我正在重写我的目的是在这里





http://msdn.microsoft.com/en-us/library/windows/desktop/ms675047(v=vs.85).aspx



可以SafeArrayGetElement函数返回的void指针被转换为C ++类型?





如果不能将它转换为sql数据类型?

I am writing a class to simplify database query on sql server ce the code I am rewring to suite my purpose is located here


http://msdn.microsoft.com/en-us/library/windows/desktop/ms675047(v=vs.85).aspx

Can the void pointer returned by SafeArrayGetElement function be casted into a C++ type?


If not can it be casted into an sql datatype?

推荐答案

请参阅 _variant_t [< a href =http://msdn.microsoft.com/en-us/library/x295h94e.aspxtarget =_ blanktitle =New Window> ^ ]类和提取器函数。当请求的类型与变体中存储的类型不同时,该类会尝试执行转换。使用封装的 VARIANT 类型的 vt 成员来确定存储的类型。
See the _variant_t[^] class and the extractor functions. When the requested type is not identical to the type stored in the variant, the class tries to perform a conversion. Use the vt member of the encapsulated VARIANT type to determine which type is stored.


这篇关于SafeArrayGetElement函数返回的void指针可以转换为C ++类型吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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