Listing 1: Header file for graphic file import using installed 32-bit Type 2 filters

/* exclude multiple includes */
#ifndef FILTER_H
#define FILTER_H

/* public manifest constants */
#define IE_SUCCESS           0    //operation completed 
                                  //successfully
#define IE_NOT_MY_FILE       5301 //generic error
#define IE_TOO_BIG           5302 //image too big
#define IE_DUMB_BITMAP       5303 //bitmap all white
#define IE_BAD_VCHAR         5304 //bad vchar in ImportString
#define IE_BAD_TOKEN         5305 //illegal wp token
#define IE_NO_VERIFY         5306 //failed to verify 
                                  //imported story
#define IE_UNKNOWN_TYPE      5307 //unknown file type
#define IE_NOT_WP_FILE       5308 //not a wp file
#define IE_BAD_FILE_DATA     5309 //file data is bad
#define IE_IMPORT_ABORT      5310 //import was aborted
#define IE_MEM_FULL          5311 //insufficient memory
#define IE_MSNG_FONTS        5312 //missing system fonts
#define IE_METAFILE_TOO_BIG  5313 //metafile too big
#define IE_INVALID_LOTUS_PIC 5314 //bad lotus .pic
#define IE_MEM_FAIL          5315 //couldn't lock memory
#define IE_UNSUPP_COMPR      5341 //unsupported compression style
#define IE_UNSUPP_VERSION    5342 //unsupported file version
#define IE_UNSUPP_COLOR      5343 //can't handle this style

/* public type defintions */
#pragma pack(push, 1)
typedef struct
{
  HANDLE hmf;  // Global memory handle to metafile
  RECT   bbox; // Bounding rect in metafile units
  DWORD  inch; // Metafile units per inch
} PICTINFO;
#pragma pack(pop)

/* public function prototypes */
//---------------------------------------------------------------
//ImportGraphic
//  const LPCSTR lpszFileName - file name of image to import
//  PICTINFO *   pPictInfo    - address of PICTINFO structure for 
//                              import results
//  const BOOL   fPreferences - TRUE to display preferences 
//                              dialog if available
//  const HWND   hwndParent   - parent window handle for 
//                              preferences dialog, NULL for no 
//                              parent window
//  >UINT>                    - import result error code
//--------------------------------------------------------------------
UINT ImportGraphic(
  const LPCSTR lpszFileName,
  PICTINFO *   pPictInfo,
  const BOOL   fPreferences=FALSE,
  const HWND   hwndParent=NULL);

#endif //FILTER_H
— End of Listing —