⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memory.c

📁 wince 6 r2 bsp template
💻 C
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
#include <windows.h>
#include <oemglobal.h>

// ---------------------------------------------------------------------------
// OEMGetExtensionDRAM: REQUIRED
//
// This function returns information about extension dynamic RAM (DRAM), if
// present on the device.
//
BOOL OEMGetExtensionDRAM(LPDWORD lpMemStart, LPDWORD lpMemLen)
{
  // Fill in extension DRAM code here.

  // False indicates no extension DRAM is present, which is a valid state.
  return FALSE; 
}

// ---------------------------------------------------------------------------
// OEMEnumExtensionDRAM: OPTIONAL
//
// This function returns information about extension dynamic RAM (DRAM),
// if present on the device.  It can describe multiple memory sections and
// if it is implemented (and mapped) it will be called in place of
// OEMGetExtensionDRAM.
//
DWORD OEMEnumExtensionDRAM(PMEMORY_SECTION pMemSections, DWORD dwMemSections)
{
  // Fill in extension DRAM code here.

  return 0; 
}

// ---------------------------------------------------------------------------
// OEMCalcFSPages: OPTIONAL
//
// This functions returns the amount of pages the kernel should use for
// the object store (RAM based filesystem).  Similar results can be
// accomplished by adjusting FSRAMPERCENT in config.bib.
//
DWORD OEMCalcFSPages(DWORD dwMemPages, DWORD dwDefaultFSPages)
{
  // Fill in page calculation code here.

  return dwDefaultFSPages;
}

// ---------------------------------------------------------------------------
// OEMReadRegistry: OPTIONAL
//
// This functions reads a registry file into RAM from persistent storage.
//
DWORD OEMReadRegistry(DWORD dwFlags, LPBYTE pBuf, DWORD len)
{
  // Fill in registry code here.

  return 0;
}

// ---------------------------------------------------------------------------
// OEMWriteRegistry: OPTIONAL
//
// This functions writes a registry file to persistent storage.
//
BOOL OEMWriteRegistry (DWORD dwFlags, LPBYTE pBuf, DWORD len)
{
  // Fill in registry code here.

  return TRUE;
}

// ---------------------------------------------------------------------------
// OEMIsRom: OPTIONAL
//
// This function determines whether a given address range falls within a
// valid range of ROM addresses.
//
BOOL OEMIsRom(DWORD dwShiftedPhysAddr)
{
  // Fill in memory code here.

  return TRUE;
}

// ---------------------------------------------------------------------------
// OEMSetMemoryAttributes: OPTIONAL
//
// This function handles changes to memory attributes.
//
BOOL OEMSetMemoryAttributes(LPVOID pVirtualAddr, LPVOID pPhysAddr, DWORD cbSize, DWORD dwAttributes)
{
  // Fill in memory code here

  return TRUE;
}

// ---------------------------------------------------------------------------
// OEMNotifyForceCleanBoot: OPTIONAL
//
// This function is called by the kernel when the filesystem is identified
// as corrupted.  The call occurs before a clean system boot is forced.
//
void OEMNotifyForceCleanBoot(DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
{
  // Fill in cleanup code here.

  return;
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -