Compartilhar via


pfnOEMSetMemoryAttributes (Windows CE 5.0)

Send Feedback

This function is initialized to NULL. OEMs can initialize this function to support changes to memory attributes.

extern BOOL(*pfnOEMSetMemoryAttributes)( LPVOID pVirtualAddr,LPVOID pPhysAddr,DWORD cbSize,DWORD dwAttributes);

Parameters

  • pVirtualAddr
    [in] Beginning virtual memory address.

    The memory address must be page aligned.

  • pPhysAddr
    [in] Corresponding physical memory address shifted by 8 bits or PHYSICAL_ADDRESS_UNKNOWN.

    If the value of this parameter is not set to PHYSICAL_ADDRESS_UNKNOWN, the physical address, which is pPhysAddr<<8, must be page aligned.

    The range specified must be physically contiguous, which means that the range (pVirtualAddr -> pVirtualAddr + cbSize) must be mapped to (pPhysAddr -> pPhysAddr + cbSize).

  • cbSize
    [in] Size, in bytes, of the memory to be changed.

    The size must be in multiple of pages.

  • dwAttributes
    [in] Memory attribute to be set.

    Only PAGE_WRITECOMBINE is supported. Write-combining allows bus write transfers to be combined into a larger transfer before bursting.

Return Values

Nonzero indicates success.

Zero indicates failure.

Remarks

This function pointer is initialized to NULL. If this function is left initialized as NULL, any call to the CeSetMemoryAttributes function fails.

To update the function pointer, OEMs should declare pfnOEMSetMemoryAttributes and initialize it in OEMInit. The following code example shows how to do this.

extern BOOL (*pfnOEMSetMemoryAttributes) (LPVOID pVirtualAddr, LPVOID pPhysAddr, DWORD cbSize, DWORD dwAttributes);
pfnOEMSetMemoryAttributes = OEMSetMemoryAttributes;

For implementation details, see the x86 and XScale CSP.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Developer-defined.
Link Library: Coredll.lib.

See Also

CeSetMemoryAttributes | NKVirtualSetAttributes | OEMInit

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.