LMarker::SetHandle

#include "ltwrappr.h"

virtual L_INT LMarker::SetHandle(phMarker, bFreePrev)

Attaches a new LEAD marker handle to the LMarker class object.

Parameters

HANDLE * phMarker

Pointer to a LEAD marker handle that references the marker collection to be attached to this object. This pointer will be invalidated if the function is successful. Pass NULL if you only want to detach the current marker handle from the marker collection.

L_BOOL bFreePrev

Flag that indicates whether to free the previous marker handle before attaching the new one. Possible values are:

Value Meaning
TRUE Free the previous marker handle before attaching the new one.
FALSE Do not free the previous marker handle before attaching the new one.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Use this function to attach a new LEAD marker handle to this LMarker class object's marker collection.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LMarker__SetHandleExample() 
{ 
   L_INT nRet; 
   LMarker MyMarker1; 
   LMarker MyMarker2; 
 
   nRet = MyMarker1.Load(MAKE_IMAGE_PATH(TEXT("ImageProcessingDemo\\Image1.jpg")), 0); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   HANDLE SomeMarkerHandle = MyMarker1.GetHandle(); 
 
   nRet = MyMarker2.SetHandle(&SomeMarkerHandle, FALSE); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = MyMarker2.SetHandle(NULL, FALSE); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help