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.
GpiLoadMetaFile (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIMETAFILES
HMF GpiLoadMetaFile(hab, pszFilename)
HAB hab; /* anchor-block handle */
PSZ pszFilename; /* address of filename of metafile */
The GpiLoadMetaFile function loads data from a file into a metafile. The
function first creates the metafile, then copies the data and returns the
metafile handle. The metafile handle can be used in subsequent calls to the
GpiPlayMetaFile or GpiDeleteMetaFile function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hab Identifies the anchor block.
pszFilename Points to a null-terminated string. This string must be a valid
MS OS/2 filename that specifies the path and filename of the
file to load into a metafile.
Return Value
The return value is a handle to the metafile 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_DOSOPEN_FAILURE
PMERR_DOSREAD_FAILURE
Example
This example uses the GpiLoadMetaFile function to load a metafile with data
from the file sample.met. Later, the metafile is deleted by using the
GpiDeleteMetaFile function.
HMF hmf;
GpiLoadMetaFile(hmf, "sample.met"); /* loads metafile from disk */
.
.
.
GpiDeleteMetaFile(hmf); /* deletes metafile */
See Also
GpiCopyMetaFile, GpiDeleteMetaFile, GpiPlayMetaFile, GpiSaveMetaFile,
GpiSetMetaFileBits, WinGetLastError
♦