ILockBytes Windows Mobile 6.5
ILockBytes
这个接口是一个字节数组对象上实现由一些物理存储,如磁盘文件,全局内存或数据库。
它使用一个组件对象模型(COM)复合文件存储对象给其根存储访问物理设备,而隔离根存储访问物理存储的细节。
大多数应用程序不会实现 ILockBytes 因为COM接口提供了实现最常见的一种情况:
基于文件的实现 如果你所说的 StgCreateDocfile函数创建一个复合文件存储对象,它包含的一个实现ILockBytes 这是关联到一个字节数组存储在一个物理磁盘文件。
复合文件存储对象调用 ILockBytes 方法。 你不叫他们直接在这个实现。
有些情况下,这将是有用的为应用程序提供它自己的 ILockBytes 实现。
例如,一个数据库应用程序可以实现 ILockBytes 创建一个字节数组对象支持的存储的关系表。 然而,强烈建议您使用COM-provided实现。
讨论了使用COM实现的优点,而不是创建自己的看到 StgCreateDocfileOnILockBytes函数,它创建了一个复合文件存储对象的调用者提供的字节数组对象。
的 ILockBytes COM的实现方法 IStorage和 IStream复合文件对象的接口。
除非你正在实施 IStorage 和 IStream ,你不需要打电话 ILockBytes 直接的方法。
如果你写你自己的 ILockBytes 实现,您可以使用 StgCreateDocfileOnILockBytes函数创建一个复合文件存储对象支持的实现 ILockBytes 。
下面的表显示了这个接口的方法按字母顺序排列的。
| 方法 | 描述 |
|---|---|
|
确保维护的任何内部缓冲区字节数组对象写入到存储支持。 |
|
|
限制访问指定范围的字节数组。 |
|
|
读取指定的字节数在指定偏移位置开始从一开始的数组。 |
|
|
字节数组的大小变化。 |
|
|
检索 STATSTG 这个字节数组对象结构。 |
|
|
删除之前限制的访问限制在一个范围的字节 ILockBytes:LocRegion 。 |
|
|
写入指定数量的字节数组中指定的位置。 |
确定平台是否支持这个接口,明白了 Determining Supported COM APIs.
| Header | objidl.h, objidl.idl |
| Library | ole32.lib, uuid.lib |
| Windows Embedded CE | Windows CE 2.0 and later |
| Windows Mobile | Windows Mobile Version 5.0 and later |
This interface is implemented on a byte array object that is backed by some physical storage, such as a disk file, global memory, or a database.
It is used by a Component Object Model (COM) compound file storage object to give its root storage access to the physical device, while isolating the root storage from the details of accessing the physical storage.
Most applications will not implement the ILockBytes interface because COM provides implementations for one of the most common situations:
File-based implementation If you call the StgCreateDocfile function to create a compound file storage object, it contains an implementation of ILockBytes that is associated with a byte array stored in a physical disk file.
The compound file storage object calls the ILockBytes methods. You do not call them directly in this implementation.
There are situations in which it would be useful for an application to provide its own ILockBytes implementation.
For example, a database application could implement ILockBytes to create a byte array object backed by the storage of its relational tables. However, it is strongly recommended that you use the COM-provided implementations.
For a discussion of the advantages of using the COM implementations rather than creating your own, see the StgCreateDocfileOnILockBytes function, which creates a compound file storage object on top of a caller-provided byte array object.
The ILockBytes methods are called by the COM implementations of the IStorage and IStream interfaces on the compound file object.
Unless you are implementing IStorage and IStream, you would not need to call ILockBytes methods directly.
If you write your own ILockBytes implementation, you can use the StgCreateDocfileOnILockBytes function to create a compound file storage object backed by your implementation of ILockBytes.
The following table shows the methods for this interface in alphabetical order.
| Method | Description |
|---|---|
|
Ensures that any internal buffers maintained by the byte array object are written out to the backing storage. |
|
|
Restricts access to a specified range of bytes in the array. |
|
|
Reads a specified number of bytes starting at a specified offset from the beginning of the array. |
|
|
Changes the size of the byte array. |
|
|
Retrieves a STATSTG structure for this byte array object. |
|
|
Removes the access restriction on a range of bytes previously restricted with ILockBytes::LocRegion. |
|
|
Writes a specified number of bytes to a specified location in the array. |
To determine whether the platform supports this interface, see Determining Supported COM APIs.
| Header | objidl.h, objidl.idl |
| Library | ole32.lib, uuid.lib |
| Windows Embedded CE | Windows CE 2.0 and later |
| Windows Mobile | Windows Mobile Version 5.0 and later |
ILockBytes Windows Mobile 6.5的更多相关文章
- 转载扩展Windows Mobile模拟器存储空间的方法
扩展Windows Mobile模拟器存储空间的方法 在Windows Mobile应用程序开发的初期,可以使用SDK自带的模拟器来进行调试,这给我们开发人员提供了一种方便的途径.一般的应用程序,占用 ...
- 解决VS2008 开发Windows Mobile 项目生成速度慢的问题(转)
最近用VS2008开发Windows Mobile程序,使用C#..NET Compact Framework,发现项目生成速度比较慢.用VS2008打开项目后,开始一段时间生成速度还能忍受,时间一长 ...
- VS连接Windows Mobile模拟器
原文:http://www.cnblogs.com/xjimmyshcn/archive/2011/07/19/2111087.html 一.WinCE 模拟器通过ActiveSync 6.1(即Wi ...
- windows mobile 共享PC网络(win7)
win7系统安装windows mobile,将设备插入底座后,设备并不能直接共享pc的网络直接上网.原来,当插入底座后,需要打开mobile设备中心,切换一下连接网络,或者打开此窗体后确定一下,即可 ...
- 解决VS2008 开发Windows Mobile 项目生成速度慢的问题
最近用VS2008开发Windows Mobile程序,使用C#..NET Compact Framework,发现项目生成速度比较慢.用VS2008打开项目后,开始一段时间生成速度还能忍受,时间一长 ...
- vs调试windows mobile程序时布署时间太长的解决办法
vs调试windows mobile程序时布署时间太长的解决办法 1.VS平台上,选工具-选项-项目和解决方案-MS BUILD项目生成输出详细信息中选择“诊断”,目的是在调试窗口中看出哪个过程编译的 ...
- Windows Mobile 6.0 SDK和中文模拟器下载
[转] Windows Mobile 6.0 SDK和中文模拟器下载 Windows Mobile 6.5 模拟器 2010年12月06日 星期一 07:48 转载自 zhangyanle86 终于编 ...
- windows mobile 6.5 隐藏 左下角(左上角)的开始按钮 叉号关闭按钮
其实做起来很简单,但是国内的网站就是找不到. 1.开始按钮原来的界面是这样的: windows mobile 6.0界面: windows mobile 6.5.X界面: 修改一个windows mo ...
- Windows Mobile 6 sdk installation error, COM3 in use,please check the implementation
问题:Windows Mobile 6 sdk installation error, COM3 in use,please check the implementation 1. Windows-& ...
随机推荐
- Ubuntu下查看CPU、内存和硬盘详细信息的几个命令
CPU: 型号:grep "model name" /proc/cpuinfo |awk -F ':' '{print $NF}' 数量:lscpu |grep "CPU ...
- 表单文件上传,ajax文件上传
原创链接:http://www.cnblogs.com/yanqin/p/5345562.html html代码 index.jsp(表单文件上传) <form action="sh ...
- python模块之os.path
对文件路径的操作 os.path.split(p)函数返回一个路径的目录名和文件名. os.path.splitext():分离文件名与扩展名 os.path.isfile()和os.path.isd ...
- python memcache 常用操作
add() 添加一条键值对,如果key已存在,重复执行add操作会报异常 mc.add('name2', 'lisi') print(mc.get('name2')) # lisi replace 修 ...
- [ Python - 9 ] 高阶函数map和reduce连用实例
1. 利用map和reduce编写一个str2float函数,把字符串'123.456'转换成浮点数123.456: from functools import reduce def str2num( ...
- [ LDAP ] LDAP服务搭建及应用
ldap 搭建及应用 node1: 192.168.118.14node2: 192.168.118.25 ldap server : 192.168.118.14 1. 安装LDAP服务器 [roo ...
- selenium 操作cookie (cookie测试)
前言 在实际的web应用中,可能会涉及到cookie测试,验证浏览器中的cookie是否正确..Cookies 验证:如果系统使用了cookie,测试人员需要对它们进行检测.如果在 cookies 中 ...
- 实例解析嵌套的JSON格式数据
关于JSON数据格式的基本知识和概念,参看: http://www.cnblogs.com/zouzf/archive/2012/03/31/2426646.html <span style=& ...
- Laravel5.5配置使用redis
1.安装redis linux上redis的安装与配置 2.安装redis客户端 composer require predis/predis或者安装 PhpRedis PHP 扩展brew inst ...
- LPD Office插件使用指南
LPD Office插件已经发布至Azure上,您可以在本机Outlook和Office Online使用该插件 一:在Outlook中使用 LPD Office插件 打开Outlook应用,并点击“ ...