LBuffer::LBuffer

#include "ltwrappr.h"

LBuffer::LBuffer()

LBuffer::LBuffer(dwSize)

LBuffer::LBuffer(lpStr)

LBuffer::LBuffer(lpData, dwSize)

LBuffer::LBuffer(LBufferSrc)

DWORD_PTR dwSize;

number of bytes with which to initialize the buffer

L_TCHAR * lpStr;

character string

L_VOID * lpData;

pointer to a data buffer

LBuffer& LBufferSrc;

an LBuffer object

Constructs the object and initializes the member variables.

Parameter

Description

dwSize

Number of bytes with which to initialize the buffer.

lpStr

Character string to be copied to the buffer.

lpData

Pointer to data buffer to be copied.

LBufferSrc

A LEAD LBuffer object to copy.

Returns

None.

Comments

LBuffer::LBuffer() is a constructor for the LBuffer class.

LBuffer::LBuffer(dwSize) will initialize the member variables and allocate the specified size of memory.

LBuffer::LBuffer(lpStr) will copy the specified string to the class object's buffer.

LBuffer::LBuffer(lpData, dwSize) will copy the specified buffer to the class object's buffer. This results in two copies of the buffer.

LBuffer::LBuffer(LBufferSrc) will copy the specified class object's buffer. This results in two copies of the buffer.

The parameter LBufferSrc is passed by reference, and is a required parameter.

Required DLLs and Libraries

LTDIS

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:

LBuffer::~LBuffer, Class Members

Example

This is an example for LBuffer::LBuffer():

L_INT LBuffer__LBufferFirstExample() 
{ 
    
   // this will call the default constructor and destructor when it is out of scope 
   LBuffer LeadBuffer ; 
 
   //... 
   return SUCCESS; 
} 
 
//This is an example for LBuffer::LBuffer(dwSize): 
 
L_INT LBuffer__LBufferSecondExample(LBitmapBase& LeadBitmap) 
{ 
   L_INT nBytesPerLine ; 
 
   nBytesPerLine = LeadBitmap.GetBytesPerLine() ; 
 
   LBuffer LeadBuffer ((DWORD)nBytesPerLine) ; 
 
   //... 
   return SUCCESS; 
} 
 
//This is an example for LBuffer::LBuffer(lpStr): 
 
L_INT LBuffer__LBufferThirdExample() 
{ 
   LBuffer LeadBuffer(TEXT("ABCD String")) ; 
 
   //... 
   return SUCCESS; 
} 
 
//This is an example for LBuffer::LBuffer(lpData, dwSize): 
 
L_INT LBuffer__LBufferForthExample(LBitmapBase& LeadBitmap)  
{ 
   LBuffer  LeadBuffer ; 
   L_INT    nBytesPerLine ; 
   L_INT nRet; 
   L_CHAR  * pBuff ; 
 
   nBytesPerLine = LeadBitmap.GetBytesPerLine() ; 
   nRet =(L_INT)LeadBitmap.GetRow(&LeadBuffer,5) ; 
   if(nRet < 1 ) 
      return nRet; 
 
   pBuff = (L_CHAR  *)LeadBuffer.Lock() ; 
 
   LBuffer LeadConstrBuffer(pBuff,(DWORD)nBytesPerLine) ; 
 
   LeadBuffer.Unlock() ; 
 
   //... 
   return SUCCESS; 
} 
 
//This is an example for LBuffer::LBuffer(LBufferSrc): 
 
L_INT LBuffer__LBufferFifthExample(LBitmapBase& LeadBitmap) 
{ 
   LBuffer  LeadBuffer ; 
   L_INT nRet; 
 
   nRet =(L_INT)LeadBitmap.GetRow(&LeadBuffer,5) ; 
   if(nRet < 1) 
      return nRet; 
 
   LBuffer LeadConstrBuffer(LeadBuffer) ; 
 
   //... 
   return SUCCESS; 
} 

Help Version 20.0.2020.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help