RFID_STATUS WINAPI RFID_FujitsuAreaWriteLock ( RFID_HANDLE32  readerHandle,
UINT8 *  pTagID,
UINT32  tagIDLength,
FUJITSU_AREA_WRITELOCK_ACCESS_PARAMS *  lpAreaWriteLockParams,
ACCESS_FILTER *  lpAccessFilter,
ANTENNA_INFO *  lpAntennaInfo,
LPVOID  rsvd 
)

This function changes the WriteLock flags of the sixteen Areas in the specified AreaGroup of one more Fujitsu tags in the FOV.

Parameters:
[in] readerHandle 
Handle to the RFID device.
[in] pTagID 
Pointer to the byte array containing Tag ID
[in] tagIDLength 
Length of the byte array containing Tag ID
[in] lpAreaWriteLockAcessParams 
Pointer to FUJITSU_AREA_WRITELOCK_ACCESS_PARAMS structure containing the AreaGroup's offset and password,Payload Mask and Action which determine the desired states of the 16 WriteLock flags of the specified AreaGroup
[in] lpAccessFilter 
Pointer to Access filter structure specifying the tag-filter criteria for the current Access operation
[in] lpAntennaInfo 
Pointer to ANTENNA_INFO structure specifying the Antenna IDs on which the access operation is to be performed
[in] rsvd 
Reserved for future use
Returns:
If the function succeeds the return value is RFID_API_SUCCESS. If the function fails the return value is one of the following:
  • RFID_API_INVALID_HANDLE Handle provided is invalid
  • RFID_API_PARAM_ERROR Parameter is invalid.
  • RFID_ACCESS_FUJITSU_AREA_WRITELOCK_FAILED Failed to change WriteLock flags on the specified tag(s)

Remarks:
It basically sets/resets the WriteLock flags of upto 16 areas in the given AreaGroup, because of which the words enclosed in the corresponding areas become write-locked or unlocked or left untouched; provided the correct AreaGroupPassword is provided.
See also:
See RFID_FujitsuChangeBlockOrAreaGroupPassword
Remarks:
Example:
// Code Snippets for setting/resetting wordLock flags
   UINT8 fujitsu8KtagID[12] = {0x99,0x86,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
   
   RFID_HANDLE32 readerHandle;
   RFID_STATUS rfidStatus = RFID_API_SUCCESS;
   CONNECTION_INFO connectionInfo;
   connectionInfo.version = RFID_API3_5_1;
   if(RFID_API_SUCCESS == RFID_Connect(&readerHandle, TEXT("157.235.207.191"), 0, 0, &connectionInfo))
   {  
           
        FUJITSU_CHANGE_BLOCK_OR_AREA_GROUPPASSWORD_ACCESS_PARAMS fujitsuChangeBlockOrAreaGroupPasswordAccessParams;
                fujitsuChangeBlockOrAreaGroupPasswordAccessParams.blockOrAreaGroupOffset = 0X01;
                fujitsuChangeBlockOrAreaGroupPasswordAccessParams.currentPassword = 0X0;
                fujitsuChangeBlockOrAreaGroupPasswordAccessParams.newPassword = 0x12345678;
//              
//              rfidStatus = RFID_FujitsuChangeBlockOrAreaGroupPassword(readerHandle,fujitsu64KTagID,12,&fujitsuChangeBlockOrAreaGroupPasswordAccessParams,NULL,NULL,NULL);
                if(rfidStatus == RFID_API_SUCCESS)
            {
                        
                        FUJITSU_AREA_READLOCK_ACCESS_PARAMS fujitsuAreaReadLockAccessParams;
                        fujitsuAreaReadLockAccessParams.blockGroupPassword = 0x12345678; 
                        fujitsuAreaReadLockAccessParams.blockOrAreaGroupOffset = 0x01;
                        fujitsuAreaReadLockAccessParams.payloadAction = 0xffff;
                        fujitsuAreaReadLockAccessParams.payloadMask  = 0xf0f0;   //First 512 bytes shall be Write-locked,next 512 bytes shall be untouched,next 512 bytes shall be Writelocked and 
                                                                                                                                         // next 512 bytes shall be untouched
                        rfidStatus = RFID_FujitsuAreaReadLock(readerHandle,fujitsu8KTagID,12,&fujitsuAreaReadLockAccessParams,NULL,NULL,NULL);
                        if(rfidStatus == RFID_API_SUCCESS)
                        {  
                            UINT8 writeUserData[8] = {0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88};
                           
                                WRITE_ACCESS_PARAMS writeAccessParams;
                                writeAccessParams.accessPassword = 0;
                                writeAccessParams.memoryBank = MEMORY_BANK_USER;
                                writeAccessParams.byteOffset = 512;
                                writeAccessParams.writeDataLength = 8;
                                writeAccessParams.pWriteData = writeUserData;
                                TAG_DATA* lpTagData = RFID_AllocateTag(readerHandle);
                                rfidStatus = RFID_Write(readerHandle, fujitsu8KTagID, 12, &writeAccessParams, NULL, NULL,NULL); // This call will fail
                                writeAccessParams.byteOffset = 512+128;
                                rfidStatus = RFID_Write(readerHandle, fujitsu8KTagID, 12, &writeAccessParams, NULL, NULL,NULL); // This call will succeed
                                
                                 
            }
            }
                   
           RFID_Disconnect(readerHandle);
   }


Generated on Fri Mar 4 02:25:31 2016 for RFIDAPI3 1.1 C API Documentation by  doxygen 1.5.6