OEMIsRom (Windows CE 5.0)

Send Feedback

This function determines if a given address range falls within a valid range of ROM addresses, and may be used to support ROM breakpoints.

BOOL OEMIsROM(  LPVOID pvAddr,  DWORD cbSize);

Parameters

  • pvAddr
    Starting address of ROM range.
  • cbSize
    Size of address range.

Return Value

This function returns TRUE if the given address falls within an accessible range of ROM addresses.

Remarks

The kernel pointer pfnOEMIsRom should be assigned to this function during OEMInit.

Your implementation of the OEMIsRom function must meet the following requirements:

  • Debug trace output is not allowed in this function.
  • If the input address range partially overlaps the ROM range, the function should return TRUE.

The following code example shows an implementation of OEMIsRom.

BOOL OEMIsRom( LPVOID pvAddr, DWORD cbSize )
{
    DWORD  CachedAddr;
    // Use cached addresses
    CachedAddr = (DWORD )pvAddr & ~CACHED_TO_UNCACHED_OFFSET;
    // Both addresses must fall within the flash range
         return( (CachedAddr < FLASH_END) && ((CachedAddr + cbSize) > FLASH_START) );
}

Requirements

OS Versions: Windows CE 5.0 or later.
Header: OEM-defined.
Link Library: OEM-defined.

See Also

Adding Support for ROM Breakpoints | pfnOEMIsROM | OEMInit

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.