Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

How do I call the LEAD\Axtel engines?
Started by Gabe-Forum@LEADTOOLS.com at 05-26-2006 9:50. Topic has 0 replies.

Print Search « Previous Thread Next Thread »
  05-26-2006, 9:50
Gabe-Forum@LEADTOOLS.com is not online. Last active: 12/30/2008 3:55:49 PM Gabe-Forum@LEADTOOLS.com



Top 25 Posts
Joined on 04-27-2005
Posts 236
How do I call the LEAD\Axtel engines?

Ample source code examples are shipped with the SDK. All LEAD\Axtel engines work in the same basic way. What follows below illustrates the general layout of all LEAD\Axtel engines. This example shows the declarations for the 32-bit barcode engine.

LONG WINAPI AxBarGetVersion32();
WORD WINAPI AxBarInit32(
        PAXBAR32 pAxBar,
        int Size); //sizeof(AXBAR32)); 
WORD WINAPI AxBar32(
        PAXIMAGE32 pAxImage,
        PAXBAR32 pAxBar);       

WORD AxBarBitmap32(
        PAXIMAGE32 pAxImage,
        PAXBAR32 pAxBar,
        HGDIOBJ hMyBitmap);

The first parameter is always a pointer to an AXIMAGE32 structure. This structure contains information that describes the image to be operated upon. It is identical to the Windows BITMAP structure with a few additional members. The second parameter is a pointer to a structure that is specific for the engine being called. In this example, it is the AXBAR32 structure. This structure contains members that tell the engine how to process the image described by the AXIMAGE32 structure. A possible third parameter is a handle to a bitmap.

In general, the application programmer should use the interface function that corresponds to the way that the image is stored in the application. If the image is in the form of a Windows bitmap, use the AxBarBitmap32 function. In this case, the caller must supply a valid handle to a Windows bitmap as the third parameter. Also, only the DpiX and DpiY members of the AXIMAGE32 structure need to be initialized. If the image is in the form of a raster image in ram, use the AxBar32 function. In this case, the caller will need to have either the handle to the buffer or a pointer to the locked buffer. These values are stored in the AXIMAGE32 structure. Also, all members of the AXIMAGE32 structure must be initialized with valid image values. The return value describes the result of the engine's action. A '0' means that all went well. Any other return must be evaluated because some values are meant as warnings and others are errors that prevented the engine from functioning properly. NOTE: The operation for the 16-bit engines is identical to the 32-bit versions. Only the names and structure definitions change.


   Report 
Post
LEAD Support Fo... » LEAD/Axtel Barc... » LEAD/Axtel FAQ » How do I call the LEAD\Axtel engines?

Powered by Community Server, by Telligent Systems