#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnGetLocked(hObject, pfLocked)
HANNOBJECT hObject; |
handle to the annotation object |
L_BOOL *pfLocked; |
address of a variable to be updated |
Gets a value that indicates whether an object is locked.
Parameter | Description | |
hObject | Handle to the annotation object. | |
pfLocked | Address of a variable to be updated with a value indicating whether the object is locked or unlocked. Possible values are: | |
Value | Meaning | |
TRUE | The object is locked. | |
FALSE | The object is not locked. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Only unlocked objects can be locked. If an object is already locked, it will stay locked with its original key. You must pass the same key to L_AnnUnlock to unlock the object(s).
An object must be unlocked in order to change its key in the automated mode.
Redact objects must be unlocked to be restored (unrealized). Refer to L_AnnUnrealize.
Required DLLs and Libraries
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
L_AnnUnlock, L_AnnShowLockedIcon, L_AnnUnrealize, L_AnnRealize, L_AnnLock |
Topics |
|
|
|
|
|
|
|
|
For complete sample code, refer to the Annotate example.
L_INT AnnGetLockedExample(HANNOBJECT hAnnObject)
{
L_BOOL bLocked;
L_INT nRet;
L_TCHAR* MyKey=TEXT("");
nRet = L_AnnShowLockedIcon(hAnnObject, TRUE, 0);
if(nRet != SUCCESS)
return nRet;
nRet = L_AnnGetLocked(hAnnObject, &bLocked);
if(nRet != SUCCESS)
return nRet;
if (bLocked)
{
MessageBox(NULL, TEXT("Object is locked. It will be unlocked.\n"), TEXT("Message"), MB_OK);
nRet = L_AnnUnlock(hAnnObject, MyKey, 0);
if (nRet == ERROR_ANN_LOCKED)
MessageBox(NULL, TEXT("Object was not unlocked!"), TEXT("Warning"), MB_OK);
}
else
{
MessageBox(NULL, TEXT("Object was not locked. It will be locked now."), TEXT("Message"), MB_OK);
nRet = L_AnnLock(hAnnObject, MyKey, 0);
if (nRet != SUCCESS)
MessageBox(NULL, TEXT("Object could not be locked.\n"), TEXT("Warning"), MB_OK);
}
return SUCCESS;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.