Delphi Variant oleVariant
The OleVariant type exists on both the Windows and Linux platforms. The main difference between Variant and OleVariant is that Variant can contain data types that only the current application knows what to do with. OleVariant can only contain the data types defined as compatible with OLE Automation which means that the data types that can be passed between programs or across the network without worrying about whether the other end will know how to handle the data. When you assign a Variant that contains custom data (such as a Delphi string, or a one of the new custom variant types) to an OleVariant, the runtime library tries to convert the Variant into one of the OleVariant standard data types (such as a Delphi string converts to an OLE BSTR string). For example, if a variant containing an AnsiString is assigned to an OleVariant, the AnsiString becomes a WideString. The same is true when passing a Variant to an OleVariant function parameter.
olevariant存在于windows和linux平台,这二种类型主要的不同是variant类型仅是当前的应用程序可以进行操作,而olevariant类型则是ole自动化服务器所以定义的统一的数据类型,意味着可以通过网络或其他程序进行操作,当然也不必担心其他客户端如何进行操作. 当你给一个variant类型的变量赋自定义的值的时候(例如delphi string,或一个其他的新的自定义类型),运行时间库将试着将他转化为olevariant标准数据类型(例如string转化为 OLE BSTR string),例如,一个包括Ansistring数据的variant类型斌值给olevariant,ansiString将成为WideString,当把variant传为olevariant的函数参数也是一样的.
Delphi Variant oleVariant的更多相关文章
- Delphi 数据类型列表 good
Delphi 数据类型列表 分类 范围 字节 备注 简单类型 序数 整数 Integer -2147483648 .. 2147483647 4 有符号32位 Cardinal 0 .. 429496 ...
- Delphi 与 C/C++ 数据类型对照表
Delphi 数据类型 C/C++ ShorInt 8位有符号整数 char Byte 8位无符号整数 BYTE,unsigned short SmallInt 16位有符号整数 short Word ...
- Delphi程序调用C#.Net编译的DLL并打开窗体(详解)
Delphi程序调用C#.Net编译的DLL并打开窗体(详解)最近用C#.Net写了一个公用模块, 本以为仅提供给.Net程序使用, 但是领导要求把这些功能提供给旧系统使用, 天啦, 几套旧系统全是D ...
- delphi的基本数据类型
2017年06月07日 11:02:25 阅读数:402 分类 范围 字节 备注 简单类型 序数 整数 Integer -2147483648 .. 2147483647 4 有符号32位 Cardi ...
- Delphi 与 C/C++ 数据类型对照表(最新的tokyo)
更新,下面这table为最新的tokyo基本数据类型与C++的对照关系: Delphi to C++ types mapping Go Up to Support for Delphi Data ...
- python4delphi 设置syspath
详细看demo25的代码 These techniques are demonstrated in Demo25 in the examples folder of your Python for D ...
- [3]第二章 C++编程简介
(本资料均从 internet 上进行收录整理,若要转载,请与原作者联系) 2.1 机器语言.汇编语言和高级语言 程序员用各种编程语言编写指令,有些是计算机直接理解的,有些则需要中间翻译(tranl ...
- Delphi OleVariant 类型的用法
因客户需求,对客户的指纹机与公司产品进行集成,需要对指纹机做接口的二次开发,郁闷的是产商只提供了VB和C的DEMO示例,没有Delphi的,公司没有VB,C的环境,不能打开这二种语言的示例,因为本公司 ...
- delphi OleVariant转换RecordSet
delphi OleVariant转换RecordSet uses Data.Win.ADODB; function varToRecordSet( parms : OleVariant ) : Da ...
随机推荐
- org.apache.hadoop.fs-BlockLocation
工具类吧 package org.apache.hadoop.fs; import org.apache.hadoop.io.*; //IO包下的类还没涉及到.遇到一个分析一个. import jav ...
- Asp.Net 之 网页快照
此文做法不是 Control.DrawToBitmap ,而是直接QueryInterface 浏览器Com对象的 IViewObject 接口,用它实现的Draw方法,画到图像上. 首先,定义IVi ...
- A Famous Music Composer
描述 Mr. B is a famous music composer. One of his most famous work was his set of preludes. These 24 p ...
- Oracle 数据泵导入导出总结
Oracle 数据泵(IMPDP/EXPDP)导入导出总结 Oracle数据泵导入导出是日常工作中常用的基本技术之一,它相对传统的逻辑导入导出要高效,这种特性更适合数据库对象数量巨大的情形,因为我日常 ...
- 给jdk写注释系列之jdk1.6容器(2)-LinkedList源码解析
LinkedList是基于链表结构的一种List,在分析LinkedList源码前有必要对链表结构进行说明. 1.链表的概念 链表是由一系列非连续的节点组成的存储结构,简单分下类的话,链 ...
- 转: Android开发中的MVP架构详解(附加链接比较不错)
转: http://www.codeceo.com/article/android-mvp-artch.html 最近越来越多的人开始谈论架构.我周围的同事和工程师也是如此.尽管我还不是特别深入理解M ...
- poj 2524 Ubiquitous Religions(宗教信仰)
Ubiquitous Religions Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 30666 Accepted: ...
- Acrobat 2015 win32破解版
Acrobat 2015 win32破解版,带破解补丁dll覆盖即可 百度云盘:http://pan.baidu.com/s/1i4tFnNJ
- Win7 32bit(x86)/64bit(x64) 完整安装版(非GHOST版本)
Windows7 32bit 旗舰iso格式完整安装镜像 百度云盘:http://pan.baidu.com/s/1bpjLPs Windows7 64bit 旗舰iso格式完整安装镜像 百度云盘:h ...
- C盘空间不足,释放C盘空间
最近电脑总是特别卡,后来发现C盘空间严重不足,只剩下几十兆,以前最严重的时候是剩下0kb可以,怎一个惨字了得... 我所知道的C盘空间不足会导致的几个主要问题有: 1)拷贝大文件会失败.因为拷贝和剪切 ...