get_metafile_bits


unsigned get_metafile_bits(handle metafile,
                           unsigned size,
                           byte* buffer)

This function copies the contents of a metafile to a buffer.

Parameters

handle metafile

The handle of the metafile.

unsigned size

The length (in bytes) of the buffer pointed to by the next parameter.

byte* buffer

A pointer to a buffer to hold the metafile data. If null is specified, the required buffer size is returned.

Return

unsigned

Zero The call failed.
Other Either the required buffer size (if the input buffer was null) or the number of bytes transferred to the buffer (when a valid pointer was given).

Notes

The data that is obtained is in the enhanced format. To retrieve data for a windows format metafile, the function get_win_metafile_bits may be used.

Once the data has been retrieved, it may be used to create a memory-based metafile (see function set_metafile_bits).