LBuffer::LBuffer

Summary

Constructs the object and initializes the member variables.

Syntax

#include "ltwrappr.h"

LBuffer::LBuffer()

LBuffer::LBuffer(dwSize)

LBuffer::LBuffer(lpStr)

LBuffer::LBuffer(lpData, dwSize)

LBuffer::LBuffer(LBufferSrc)

Parameters

DWORD_PTR dwSize

Number of bytes with which to initialize the buffer.

L_TCHAR * lpStr

Character string to be copied to the buffer.

L_VOID * lpData

Pointer to data buffer to be copied.

LBuffer& 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

Platforms

Win32, x64.

See Also

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 22.0.2023.2.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.