This function saves the number of .bin files to be downloaded and their addresses and sizes.
这个函数保存要下载的.bin文件的数目和他们的地址以及大小。
句式:
void OEMMultiBINNotify(
  const PMultiBINInfo pInfo
);
参数:
pInfo
[in] Contains information about the downloaded .bin files.
返回值:
NONE
备注:
The number of .bin files to be downloaded and their addresses and sizes are necessary to successfully cache all the OS images in RAM, if they are destined for flash memory.
如果.bin文件要下载的数目和他们的地址、大小的目的地址是flash memory,他们是很有必要成功地缓存到RAM里面的操作系统镜像文件。
g_pOEMMultiBINNotify is a function pointer. You can assign the address of a custom BIN notify routine that the BLCOMMON code then calls at the appropriate time through this function pointer. The following code example shows how you can perform this routine.
g_pOEMMultiBINNotify是一个函数指针。你可以分配一个定制的BIN通知例程的地址,这个例程的BLCOMMON代码接着在合适的时间通过这个函数指针调用。下面的代码例子显示了你是如何执行这个例程的。

BOOL OEMMultiBINNotify(const PMultiBINInfo pInfo);
g_pOEMMultiBINNotify = OEMMultiBINNotify;
要求:
Header blcommon.h
Library blcommon.lib
Windows Embedded CE Windows CE .NET 4.2 and later

==========================================================-------------==========
Adding Support for Multiple-BIN Image Notification

Platform Builder and the BLCOMMON library support downloading multiple .bin files during the same download session. This is useful when developing a multi-BIN run-time image.
Platform Builder and the BLCOMMON library 支持多bin文件的下载在统一下载阶段。当你在开发多bin运行时镜像文件这是很有用的。

The BLCOMMON library can notify third-party code about each .bin file to be downloaded, and the .bin file's address and length, through a function pointer.
The BLCOMMON library可以识别第三方代码关于每个要下载的.bin文件,.bin文件的地址和长度,通过一个函数指针来进行下载。

This information is useful when deciding how to temporarily cache a multi-BIN run-time image in RAM before writing it to flash memory. For more information, see OEMMultiBINNotify.
这个信息是有用的,当决定如何去临时的缓存一个在RAM中的多bin运行时镜像文件,并把它写入进flash memory。对于更多的消息,可以查阅OEMMultiBINNotify.

The following code example shows an implementation of OEMMultiBINNotify.
下面的代码例子显示了OEMMultiBINNotify的实现。
void OEMMultiBINNotify(const PMultiBINInfo pInfo)
{
    BYTE nCount;

if (!pInfo || !pInfo->dwNumRegions)
    {
        EdbgOutputDebugString("WARNING: OEMMultiBINNotify: Invalid BIN region descriptor(s).\r\n");
        return;
    }

g_dwMinImageStart = pInfo->Region[0].dwRegionStart;

EdbgOutputDebugString("\r\nDownload BIN file information:\r\n");
    EdbgOutputDebugString("-----------------------------------------------------\r\n");
    for (nCount = 0 ; nCount < pInfo->dwNumRegions ; nCount++)
    {
        EdbgOutputDebugString("[%d]: Base Address=0x%x  Length=0x%x\r\n" , nCount, pInfo->Region[nCount].dwRegionStart, pInfo->Region[nCount].dwRegionLength);
        if (pInfo->Region[nCount].dwRegionStart < g_dwMinImageStart)
        {
            g_dwMinImageStart = pInfo->Region[nCount].dwRegionStart;
            if (g_dwMinImageStart == 0)
            {
                EdbgOutputDebugString("WARNING: OEMMultiBINNotify: Bad start address for region (%d).\r\n", nCount);
                return;
            }
        }
    }

memcpy((LPBYTE)&g_BINRegionInfo, (LPBYTE)pInfo, sizeof(MultiBINInfo));
}

When using BLCOMMON during boot loader initialization, for example, OEMDebugInit, the multi-BIN notification function pointer should be assigned to the OEM's notification routine.

For example, to have BLCOMMON call OEMMultiBINNotify to validate the image signature, you should do the following in OEMDebugInit.
在boot loader初始化的时候使用BLCOMMON,例如,OEMDebugInit,the multi-BIN 通知函数指针应该分配给OEM的通知例程。
例如,让BLCOMMON 调用 OEMMultiBINNotify使镜像签名有效,你可以在OEMDebugInit中进行如下设置:
g_pOEMMultiBINNotify = OEMMultiBINNotify;

-----------------------------------------------------------------------------------------------------------------

This function verifies that the address provided is in valid memory.
这个函数校验有效内存中提供的地址。
句式:
BOOL OEMVerifyMemory(
  DWORD dwStartAddr,
  DWORD dwLength
);
参数:
dwStartAddr
[in] Address to be verified.

dwLength
[in] Length of the address, in bytes.
返回值:
TRUE indicates success. FALSE indicates failure.
备注:
g_pOEMVerifyMemory is a function pointer. An OEM can assign the address of a custom verify memory routine that the BLCOMMON code then calls at the appropriate time through this function pointer. The following code example shows how you can perform this routine.
g_pOEMVerifyMemory是一个函数指针。OEM可以分配给一个定制的校验内存例程分配例程,是在适当的时间通过这个函数指针调用 BLCOMMON代码实现的。下面的代码的例子显示了你可以执行这个例程。

BOOL OEMVerifyMemory(DWORD dwStartAddr, DWORD dwLength);
g_pOEMVerifyMemory = OEMVerifyMemory;
要求:
Header blcommon.h
Library blcommon.lib
Windows Embedded CE Windows CE .NET 4.2 and later

-----------------------------------------------------------------------------------------------------------

Mount settings can be located anywhere along a multi-level hierarchy of registry keys starting at HKEY_LOCAL_MACHINE\System\StorageManager\Profiles. The scope of the mount setting narrows at each level in the same manner as variable scope in a C++ program. At any particular level, Storage Manager combines the applicable settings to generate the proper mount settings for a specific instance of a mounted file. Settings at a lower level in the hierarchy override values that might have been set at a higher level.
Mount可以和多级别的注册键值一起被定位在HKEY_LOCAL_MACHINE\System\StorageManager\Profiles的任何地方。mount的范围可以在C++程序中的每一级别以同样的方式作为可视的范围进行狭窄的设置。再任何特定的级别,Storage Manager结合适当的设置可以对一个挂载区域的特定的实例进行适当的mount设置。在其更低一级别的设置可能比更高一级的设置的优先级要高。

* Mount settings under the base profile key(在基本的文件键值)
      Settings at [HKLM\System\StorageManager\Profiles] pertain to all file systems on all profile-based storage devices; that is, any file system with a block device. Note that this excludes AutoLoad file systems.
      在[HKLM\System\StorageManager\Profiles] 分区下的设置,对于在所有基于文件存储设备上的所有文件系统,任何文件系统都有块设备。注意这个排除了 AutoLoad文件系统。

* Mount settings under a specific profile key(指定的文件键值)
      Settings at [HKLM\System\StorageManager\Profiles\<MyProfileName>], pertain to all mounted instances of all file systems on storage devices reporting the profile <MyProfileName>.
      在[HKLM\System\StorageManager\Profiles\<MyProfileName>]下进行设置,对于在存储设备上的所有文件系统的挂载实例的分区,记录着<MyProfileName>文件。

* Mount settings under a file system sub-key of a profile specific key(一个给定文件系统键值下的一个文件系统的子键)
      Settings under a file system sub-key, [HKLM\System\StorageManager\Profiles\< MyProfileName>\<MyFileSystemName >], pertain to only mounted instances of < MyFileSystemName > on storage devices reporting the profile <MyProfileName>.
      在一个文件系统子键下进行设置,[HKLM\System\StorageManager\Profiles\< MyProfileName>\<MyFileSystemName >],只
在存储设备上挂载的< MyFileSystemName >实例记录profile <MyProfileName>的分区。
    * Mount settings under a partition sub-key of a profile specific key(一个给定文件系统的键值下的一个分区子键)
      Settings at [HKLM\System\StorageManager\Profiles\<MyProfileName>\<MyPartitionName>], pertain to only the partition named <MyPartitionName> when mounted on devices reporting the profile <MyProfileName>.
     在[HKLM\System\StorageManager\Profiles\<MyProfileName>\<MyPartitionName>]进行设置,分区只存在 <MyPartitionName>的分区。当挂载在设备记录着文件<MyProfileName>。

For versions of Windows Embedded CE earlier than Windows CE 5.0, you can place mount settings in the MountFlags value. MountFlags value use bitwise OR combinations to specify how the partition should be mounted. Values for MountFlags and its replacements can be set at the Profiles level, and also within an individual profile.
对于Windows CE 5.0之前的版本,你可以进行mount设置在MountFlags value值里。MountFlags value使用逐位或者组合在一起去明确分区是如何被装载的。MountFlags的值和它的替代值可以在Profiles级别进行设置,也可以在每个Profiles下面进行设置。

For Windows CE 5.0 and later, the MountFlags registry flag has been deprecated. Replacement values are simpler: each replacement value can be dword:1, indicating that the setting is turned on, or dword:0, indicating that the setting is turned off.
对于Windows CE 5.0和之后的版本,MountFlags 注册表 的flag已经不推荐使用了。用更简单的值去替代:每个替代值可以被设置成dword:1,指出设置被打开,或者dword:0,指出设置设置被关闭

The following table provides summary descriptions of flags for setting mount values.
下表提供了关于mount值简要的描述和属性

Flag                 Description

"MountFlags"        Indicates how the partition is mounted.
                    This value has been deprecated for Windows CE 5.0 and later. It is                     recommended that you use the replacement registry keys listed below to                     indicate partition mount values.
指出分区是如何挂载的
这个值在Windows CE 5.0 and later已经不推荐使用了。它被推荐使用下面列出的标志分区挂载值的注册表键值来代替。

"MountHidden"       Specifies a hidden file system. Set to 1 to enable.

Replaces "MountFlags"=dword:1
明确一个隐藏的文件系统,设置1使能。代替了一签版本使用的"MountFlags"=dword:1

"MountAsBootable"   Specifies that the file system may contain the system registry. The                          first mounted partition on the store gets the hive. Set to 1 to enable.

Replaces "MountFlags"=dword:2
明确了文件系统可能包含的系统注册表。存储设备上的第一个挂载的分区是基于蜂窝的,设置1去使能。代替了以往的:"MountFlags"=dword:2
"MountAsRoot"       Specifies to mount as the root of the file system. Set to 1 to enable.

Replaces "MountFlags"=dword:4
明确了作为文件系统的根。设置1使能。替代以前版本的"MountFlags"=dword:4
"MountAsROM"        Specifies to mount as an external ROM file system. Set to 1 to enable.

Replaces "MountFlags"=dword:10
明确了挂载作为一个扩展ROM文件系统,设置1去使能,替代以前版本的"MountFlags"=dword:10
"MountSystem"       Treats all files and subdirectories as system files. Set to 1 to enable.

Replaces "MountFlags"=dword:20
把所有的文件和子路径看成系统文件。设置1使能,替代老版本的"MountFlags"=dword:20
"MountPermanent"    Indicates this volume can never be dismounted. Set to 1 to enable.

Replaces "MountFlags"=dword:40
指出了这个分区时永远不能被挂载的,设置1使能。替代以前版本的"MountFlags"=dword:40
"MountAsNetwork"    Indicates this volume receives all UNC paths. Set to 1 to enable.

Replaces "MountFlags"=dword:80
指出了这个分区接收所有的UNC路径,设置1使能。替代以前版本的"MountFlags"=dword:80

The following table shows examples of typical replacements for deprecated MountFlags values:
下表显示了典型的替代不赞成使用的MountFlags的值:
Deprecated value:      Replacement values             Description

"MountFlags"=dword:6     "MountAsBootable"=dword:1"MountAsRoot"=dword:1

Mounts the partition at the root as a bootable partition.
挂载一个分区在根目录作为一个引导分区表

"MountFlags"=dword:11    "MountHidden"=dword:1"MountAsROM"=dword:1

Mounts the partition as ROM, and makes the partition not visible to users.
挂载一个分区作为ROM,并使分区对于用户是不可见的。

转载于:https://www.cnblogs.com/Torres_fans/archive/2010/04/23/1718707.html

Muti-bin的一些相关函数和设置相关推荐

  1. mysql bin的过期时间_Mysql设置binlog过期时间并自动删除

    问题: Mysql数据库由于业务原因,数据量增长迅速,binlog日志会增加较多,占用大部分磁盘空间. 解决方案: 出于节约空间考虑,可进行删除多余binary日志,并设置定期删除操作. 1.查看bi ...

  2. zend studio配置mysql_Zend studio for eclipse中使php可以调用mysql相关函数的设置方法

    如果直接调用mysql_connect会出现:Fatal error: Call to undefined function mysql_connect() 的错误 解决办法, 找到zend stud ...

  3. tomcat 性能设置

    Tomcat性能调优: 找到Tomcat根目录下的conf目录,修改server.xml文件的内容.对于这部分的调优,我所了解到的就是无非设置一下Tomcat服务器的最大并发数和Tomcat初始化时创 ...

  4. 命令别名的设置alias,unalias

    alias命令的作用是为系统中的命令设置别名,如果常用命令比较长,那么为其设置别名可以简化用户操作,例如为ls -l | more命令设置别名lm,这样只需要输入lm就可以得到和 ls -l | mo ...

  5. SVN、Git设置提交时忽略的文件

    个人正在使用的:global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.pyc *.pyo [Tt]humbs.db [Bb]in [ ...

  6. 设置Golang的GOPATH

    设置Golang的GOPATH chenjh213 · 2016-05-31 21:00:01 · 2417 次点击 · 预计阅读时间 2 分钟 · 大约1分钟之前 开始浏览 这是一个创建于 2016 ...

  7. vscode安装设置go

    vscode安装设置go vscode安装go配置 1.下载最新的vscode:  https://code.visualstudio.com/docs/?dv=win 2.下载go:  https: ...

  8. 【嵌入式开发】时钟初始化 ( 时钟相关概念 | 嵌入式时钟体系 | Lock Time | 分频参数设置 | CPU 异步模式设置 | APLL MPLL 时钟频率设置 )

    文章目录 一. 时钟相关概念解析 1. 相关概念术语 ( 1 ) 时钟脉冲信号 ( 概念 : 电压幅度 时间间隔 形成脉冲 | 作用 : 时序逻辑基础 间隔固定 根据脉冲数量可计算出时间 ) ( 2 ...

  9. VS2010+OpenCV2.4.3配置(一次设置,永久生效)

    一.配置环境变量 环境变量path: D:\openCV2.4.3\opencv\build\x86\vc10\bin 其中D:\openCV2.4.3\opencv\是我OpenCV安装的home目 ...

最新文章

  1. 让nginx支持php和path_info(新版本)
  2. texlive安装需要多久_LaTex编译环境安装与使用
  3. 在JavaScript中遭遇级联表达式陷阱
  4. Request.InputStream 将数据作为XML数据发送
  5. 前端学习(2591):刷新页面vuex消失
  6. mysql 集中join的区别
  7. 女人为什么必须学习会家庭财富管理?
  8. 常见印花疵点及产生原因
  9. 提问的智慧 程序员成长之路
  10. FL2440-学习记录(三)
  11. Matlab计算空间权重矩阵(地理距离和经济地理距离)
  12. 维智WSDA系列伺服驱动器用户手册(MECHATROLINK-Ⅱ总线通信型)-R7
  13. 超强PHP集成开发工具:phpDesigner v7.2.1 最新版下载(附注册机)
  14. Android开发语音转文字,在Android上语音转文字
  15. 融合黄金正弦与sigmoid连续化的海鸥优化算法-附代码
  16. pytorch实现风格迁移 style transfer
  17. DY(抖音)、KS(快手)、西瓜、知乎等批量去水印小程序版本可视化版本
  18. ArcGIS属性表的计算
  19. 三维家可以导入别人的方案吗_怎么把su模型导入三维家
  20. Java实现Shamir秘密共享带注释

热门文章

  1. 2018百度秋招一面/二面/三面
  2. 基于 Python 的开源Web开发框架django/哈工大学生成绩管理系统html实现/python结课大作业
  3. 如何处理文字中的emoji?
  4. 关于STM32仿真ITM调试那些事(STM32+JLINK+KEIL)
  5. howlerjs 音乐播放插件
  6. 3DMatch数据集
  7. Keras 之 LSTM 有状态模型(stateful LSTM)和无状态模型(stateless LSTM)
  8. centos7 安装Calibre搭建一个家用图书馆
  9. SMR磁盘学习8---Novel Address Mappings for Shingled Write Disks
  10. [转] Stay Hungry, Stay Foolish !!