Glossary Item Box
Use this function to load the plug-in you want to process. A plug-in must first be loaded with this call before it can be invoked. You can also call it with either NULL or as the value for lpPlugInName and this function will unload the currently loaded plug-in.
|
Parameter |
Type |
Description |
|
lpPlugInName |
LPSTR |
The plug-in's file name with out the path. |
Return Value
Returns IMG_OK if successful, otherwise it returns IMG_ERR and IMGPI_ERRORLOADINGPLUGIN will be return by ImgGetStatus().
Comments
The plug-in host builds the full file name with the path specified in the ImgPlugInHostLoad call.
Example
int iErr, iFlags = 0 ;
LPBITMAPINFO lpbi ;
if ( (iErr=ImgPlugInLoad ( coolplug.8bf )) == IMG_OK ) {
if ( ! ( lpbi = ImgGetInfo ( hImage, &iFlags ) ) ) {
ImgErrBox() ;
return ;
}
if ( ( lpbi->bmiHeader.biBitCount != 24 ) &&
(iFlags!=IMG_DISP_VECTOR) )
return ;
iErr = ImgPlugInInvoke( hImage, hWnd, NULL ) ;
if ( iErr != IMG_OK ) {
ImgErrBox () ;
return ;
}
}
// now you can go own to draw the image
Copyright 2008 Data Techniques, Inc. All Rights Reserved