gpi12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GpiSetMetaFileBits (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIMETAFILES
 
BOOL GpiSetMetaFileBits(hmf, off, cbBuffer, pbBuffer)
HMF hmf;           /* message-queue handle         */
LONG off;          /* offset into the metafile     */
LONG cbBuffer;     /* length of the metafile data  */
PBYTE pbBuffer;    /* address of the metafile data */
 
The GpiSetMetaFileBits function copies data to the metafile specified by
hmf from the buffer pointed to by the pbBuffer parameter. The function
inserts the bytes into the metafile, up to the number of bytes specified by
cbBuffer, at the byte in the metafile where the offset from the beginning of
the metafile is specified by the off parameter.
 
The application must ensure that the metafile data has the correct format.
The data should not be changed after it is created by the
GpiQueryMetaFileBits function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hmf        Identifies the metafile memory.
 
off        Specifies the offset in bytes from the beginning of the metafile
           to the first byte that receives copied data.
 
cbBuffer   Specifies the number of bytes of metafile data to copy.
 
pbBuffer   Points to the buffer to receive the metafile data. It must have
           the number of bytes specified by the cbBuffer parameter.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_INV_HMF
     PMERR_INV_METAFILE_LENGTH
     PMERR_INV_METAFILE_OFFSET
 
See Also
 
GpiQueryMetaFileBits, WinGetLastError