Jump to content

GpiDeleteMetaFile

From EDM2

This function deletes a metafile.

Syntax

GpiDeleteMetaFile(hmf)

Parameters

hmf (HMF) - input
Metafile handle.

Return Value

rc (BOOL) - returns
Success indicator.
TRUE: Successful completion
FALSE: Error occurred.

Remarks

This function deletes access to the specified memory metafile and makes the metafile handle invalid.

Errors

Possible returns from WinGetLastError:

PMERR_INV_HMF (0x207E)
An invalid metafile handle was specified.
PMERR_METAFILE_IN_USE (0x20D9)
An attempt has been made to access a metafile that is in use by another thread.
PMERR_TOO_MANY_METAFILES_IN_USE (0x2106)
The maximum number of metafiles allowed for a given process was exceeded.

Example Code

This example uses GpiDeleteMetaFile to delete a metafile previously loaded with GpiLoadMetaFile.

#define INCL_GPIMETAFILES /* Metafile functions */
#include <os2.h>

BOOL fSuccess; /* success indicator */
HMF hmf; /* metafile handle */
HAB hab; /* anchor block handle */

/* loads metafile from disk */
hmf = GpiLoadMetaFile(hab, "sample.met");
.
.
.
fSuccess = GpiDeleteMetaFile(hmf);

Related Functions