GpiQueryMetaFileLength: Difference between revisions
Appearance
Created page with "This function returns the total length of a memory metafile, in bytes. ==Syntax== GpiQueryMetaFileLength(hmf) ==Parameters== ; hmf (HMF) - input : Memory-metafile handle. ==Return Value== ; lLength (LONG) - returns : Total length of the metafile. :; >=0 :: Total length of the metafile :; GPI_ALTERROR :: Error. ==Remarks== This function is normally used before GpiQueryMetaFileBits. ==Errors== Possible returns from WinGetLastError: ; PMERR_INV_HMF (0x207E..." |
mNo edit summary |
||
| Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
; hmf ([[HMF]]) - input | ; hmf ([[HMF]]) - input: Memory-metafile handle. | ||
: Memory-metafile handle. | |||
==Return Value== | ==Return Value== | ||
; lLength ([[LONG]]) - returns | ;lLength ([[LONG]]) - returns: Total length of the metafile. | ||
: Total length of the metafile. | :: >=0 - Total length of the metafile | ||
: | :: GPI_ALTERROR - Error. | ||
: | |||
==Remarks== | ==Remarks== | ||
| Line 21: | Line 17: | ||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError: | Possible returns from WinGetLastError: | ||
; PMERR_INV_HMF (0x207E) | ; PMERR_INV_HMF (0x207E): An invalid metafile handle was specified. | ||
: An invalid metafile handle was specified. | ; PMERR_TOO_MANY_METAFILES_IN_USE (0x2106): The maximum number of metafiles allowed for a given process was exceeded. | ||
; PMERR_TOO_MANY_METAFILES_IN_USE (0x2106) | |||
: The maximum number of metafiles allowed for a given process was exceeded. | |||
==Example Code== | ==Example Code== | ||
This example uses GpiQueryMetaFileLength to query the byte length of a memory metafile. | This example uses GpiQueryMetaFileLength to query the byte length of a memory metafile. | ||
<pre> | <pre> | ||
#define INCL_GPIMETAFILES /* Meta File functions */ | #define INCL_GPIMETAFILES /* Meta File functions */ | ||
#include | #include <os2.h> | ||
HMF hmf; /* memory-metafile handle */ | HMF hmf; /* memory-metafile handle */ | ||
LONG lLength; /* length of metafile */ | LONG lLength; /* length of metafile */ | ||
Latest revision as of 00:37, 17 November 2025
This function returns the total length of a memory metafile, in bytes.
Syntax
GpiQueryMetaFileLength(hmf)
Parameters
- hmf (HMF) - input
- Memory-metafile handle.
Return Value
- lLength (LONG) - returns
- Total length of the metafile.
- >=0 - Total length of the metafile
- GPI_ALTERROR - Error.
Remarks
This function is normally used before GpiQueryMetaFileBits.
Errors
Possible returns from WinGetLastError:
- PMERR_INV_HMF (0x207E)
- An invalid metafile handle was specified.
- PMERR_TOO_MANY_METAFILES_IN_USE (0x2106)
- The maximum number of metafiles allowed for a given process was exceeded.
Example Code
This example uses GpiQueryMetaFileLength to query the byte length of a memory metafile.
#define INCL_GPIMETAFILES /* Meta File functions */ #include <os2.h> HMF hmf; /* memory-metafile handle */ LONG lLength; /* length of metafile */ lLength = GpiQueryMetaFileLength(hmf);