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-& ...
随机推荐
- servlet(5) - Cookie和session - 小易Java笔记
1.会话概述 (1)会话可简单理解为:用户开一个浏览器,点击多个超链接,访问服务器多个web资源,然后关闭浏览器,整个过程称之为一个会话. (2)会话过程中的数据不宜保存在request和servle ...
- 快速搭建YUM源和yum使用
yum是一种便捷,快速的RPM包安装方法,可以避免很多包的关联性,但RedHat的YUM源,不是免费的,需要他们的RHN才能够用,而CentOS得yum是免费的,由于CentOS和RedHat相似度高 ...
- DRF自带的Request和Response对象(DRF基类APIView)
# 转载请留言联系 1.Request对象 DRF传入视图的request对象,不再是Django默认的HttpRequest对象,而是扩展了HttpRequest类的Request类的对象. RES ...
- LISTVIEW 消息 结构 宏
如果是要画的话,用CreateWindowEx创建 指定 WC_LISTVIEW window class 关于其消息如下: LVM_APPROXIMATEVIEWRECT LVM_ARRANGE ...
- cmake 查找头文件和库文件顺序
cmake会先到*_DIR里指定.cmake文件里去找找不到了才会到/usr里去找 所以要小心cmake给你找的文件,如果在一台电脑里装了不止一个版本库.
- QTP自动化测试框架的基础知识
1. 什么是自动化测试框架? 假定你有一个活,需要构建许多自动化测试用例来测试这个应用程序.当你对这个应用程序完成自动化测试后,你对自己创建脚本应该有什么期望吗?你难道不想要- 脚本应该按照预期的来执 ...
- thinkphp函数学习(0)——开篇
因为新公司都使用thinkphp,所以就想通读一遍源码,可是在读的过程中,时常半路杀出个自定义函数,然后又要跳到函数定义的地方先看具体的函数定义,感觉特别的难受,好几次都是看到runtime.php就 ...
- cvCalcOpticalFlowPyrLK的使用--基于高斯金字塔的稀疏光流特征集求解
void cvCalcOpticalFlowPyrLK( const CvArr* prev, const CvArr* curr, CvArr* prev_pyr, CvArr* curr_pyr, ...
- (寒假GYM开黑)2018 German Collegiate Programming Contest (GCPC 18)
layout: post title: 2018 German Collegiate Programming Contest (GCPC 18) author: "luowentaoaa&q ...
- hiho一下第134周 1468 : 2-SAT·hihoCoder新春晚会
1468 : 2-SAT·hihoCoder新春晚会 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 hihoCoder新春晚会正在紧张地筹备中.晚会分为上半场和下半场, ...