Share via


OEMCompressSnapshot (Compact 2013)

10/16/2014

This OEM-implemented function compresses the snapshot image before the image is written to storage.

Syntax

BOOL OEMCompressSnapshot(
    LPCVOID pSrc,
    DWORD cbSrc,    LPVOID pDst,
    PDWORD pcbDst);

Parameters

  • pSrc
    [in] Pointer to the start of the snapshot memory buffer to be compressed.
  • cbSrc
    [in] Size, in bytes, of the snapshot memory buffer to compress.
  • pDst
    [in] Pointer to the start of the memory buffer where the compressed snapshot is written.
  • pcbDst
    [in, out] On entry, size of the memory buffer to be compressed. On exit, size of the compressed image.

Note

On entry, pSrc, cbSrc, pDst, and pcbDst are all guaranteed to be 4 KB-aligned.

Return Value

Implement this function so that it returns true if the snapshot image compresses successfully. Return false if you do not choose to compress the snapshot, or if the snapshot fails to compress.

Remarks

The OEM must implement this function if the OEM supports snapshot boot. The OS calls this function while taking a snapshot.

You can choose to implement a compression method of your choice. If you don’t compress the image, you may incur longer snapshot save or restore times, because the image in its larger size must be transferred to and from storage.

If you choose to compress the snapshot image and it fails to compress, you can still proceed and save the snapshot image in its uncompressed state if there is enough storage space to do so.

If you implement this function, provide its address in the pfnCompress member of SnapshotSupport.

Requirements

Header

Developer Implemented

Library

OEMMain.lib or OEMMain_StaticKITL.lib

See Also

Reference

Optional OAL Functions