GetEnhMetaFileDescription function
Applies to: desktop apps only
The GetEnhMetaFileDescription function retrieves an optional text description from an enhanced-format metafile and copies the string to the specified buffer.
Syntax
UINT GetEnhMetaFileDescription( __in HENHMETAFILE hemf, __in UINT cchBuffer, __out LPTSTR lpszDescription );
Parameters
- hemf [in]
-
A handle to the enhanced metafile.
- cchBuffer [in]
-
The size, in characters, of the buffer to receive the data. Only this many characters will be copied.
- lpszDescription [out]
-
A pointer to a buffer that receives the optional text description.
Return value
If the optional text description exists and the buffer pointer is NULL, the return value is the length of the text string, in characters.
If the optional text description exists and the buffer pointer is a valid pointer, the return value is the number of characters copied into the buffer.
If the optional text description does not exist, the return value is zero.
If the function fails, the return value is GDI_ERROR.
Remarks
The optional text description contains two strings, the first identifying the application that created the enhanced metafile and the second identifying the picture contained in the metafile. The strings are separated by a null character and terminated with two null charactersfor example, "XYZ Graphics Editor\0Bald Eagle\0\0" where \0 represents the null character.
Where text arguments must use Unicode characters, use this function as a wide-character function. Where text arguments must use characters from the Windows character set, use this function as an ANSI function.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | GetEnhMetaFileDescriptionW (Unicode) and GetEnhMetaFileDescriptionA (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012