L_VersionInfo

#include "l_bitmap.h"

L_LTKRN_API L_INT L_VersionInfo(pVersionInfo, uStructSize)

pVERSIONINFO pVersionInfo;

/* pointer to the VERSIONINFO structure */

L_UINT uStructSize;

/* size of the structure pointed to by pVersionInfo */

Loads LEADTOOLS product information into a structure.

Parameter

Description

pVersionInfo

Pointer to the VERSIONINFO structure.

uStructSize

Size of the VERSIONINFO structure pointed to by pLoadOptions. The size of this structure must be specified.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

To use this function, declare a VERSIONINFO variable and pass its address as the parameter of this function. The function updates the fields in the structure. For field descriptions, refer to the VERSIONINFO structure.

Required DLLs and Libraries

LTKRN

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

Win32, x64.

See Also

Functions:

L_SetLicenseFile, L_IsSupportLocked, L_SetLicenseBuffer

Topics:

Support Functions: Version and License Information

 

Setting a Runtime License

Example

For complete sample code, refer to the INFO example. This example gets product information and displays it in a message box

 L_INT VersionInfoExample(L_VOID)
{
   L_INT nRet;
   VERSIONINFO VersionInfo;         /* LEAD Version Information structure. */
   L_TCHAR     szMessage[ 1024 ];   /* Buffer to hold information for display. */

   /* Get the version information */
   VersionInfo.uStructSize = sizeof(VERSIONINFO);
   nRet = L_VersionInfo(&VersionInfo, sizeof(VERSIONINFO));
   if(nRet != SUCCESS)
      return nRet;
   /* Format the message string with data from the VERSIONINFO structure */
   wsprintf(szMessage,
            TEXT("LEAD Product: %hs, %hs\n\n")
            TEXT("Version %d.%d\n\n")
            TEXT("Date: %hs\n\n")
            TEXT("Time: %hs"),
            (L_CHAR *)VersionInfo.Product,
            (L_CHAR *)(VersionInfo.Level == TOOLKIT_LEVEL_DOCUMENT ?
            TEXT("Document/Medical ") : TEXT("Professional Edition")),
            VersionInfo.MajorNumber,
            VersionInfo.MinorNumber,
            (L_CHAR *)VersionInfo.Date,
            (L_CHAR *)VersionInfo.Time);

   /* Display the message string */
   MessageBox( NULL, szMessage, TEXT("API Version Information"), MB_OK );
   return SUCCESS;
}