L_LoadExtensionStamp

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_LoadExtensionStamp(pExtensionList, pBitmap, uStructSize)

pEXTENSIONLIST pExtensionList;

/* pointer to a structure */

pBITMAPHANDLE pBitmap;

/* pointer to a bitmap handle */

L_UINT uStructSize;

/* size in bytes, of the structure pointed to by pBitmap */

Loads a stamp from the specified extension list.

Parameter

Description

pExtensionList

Pointer to the EXTENSIONLIST structure that contains the stamp to load.

pBitmap

Pointer to the bitmap handle that references the bitmap to be updated with the stamp loaded from the specified extension list.

uStructSize

Size in bytes, of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE).

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The extensions referenced by the pExtensionList parameter must be loaded by calling the L_ReadFileExtensions function.

Required DLLs and Libraries

LTFIL
Exif file format DLLs

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP, Windows CE.

See Also

Functions:

L_ReadFileExtensions, L_GetExtensionAudio, L_FreeExtensions, L_ReadFileStamp

Topics:

Raster Image Functions: Getting and Setting File Information

 

Exif File Extensions

 

Implementing Exif Features

Example

static L_INT LoadExtensionStamp(HWND hWnd, L_TCHAR L_FAR* pszName, pBITMAPHANDLE pBitmap)
{
   pEXTENSIONLIST pExtensionList;
   L_INT nRet;
   L_TCHAR s[300];

   nRet = L_ReadFileExtensions(pszName, &pExtensionList, NULL);
   if(nRet != SUCCESS)
   {
      wsprintf(s, TEXT("Error %d getting extensions!"), nRet);
      MessageBox(hWnd, s, TEXT("ERROR"), MB_OK);
      return nRet;
   }

   if(pExtensionList->uFlags & EXTENSION_STAMP)
   {
      nRet = L_LoadExtensionStamp(pExtensionList, pBitmap, sizeof(BITMAPHANDLE));
      if (nRet != SUCCESS)
      {
         wsprintf(s, TEXT("Error %d loading the stamp"), nRet);
         MessageBox(hWnd, s, TEXT("ERROR"), MB_OK);
      }
   }
   else
         MessageBox(hWnd, TEXT("The extensions do not contain a stamp"), TEXT("ERROR"), MB_OK);

   L_FreeExtensions(pExtensionList);
   return SUCCESS;
}