RFID_STATUS WINAPI RFID_FujitsuChangeBlockLock ( RFID_HANDLE32  readerHandle,
UINT8 *  pTagID,
UINT32  tagIDLength,
FUJITSU_CHANGE_BLOCKLOCK_ACCESS_PARAMS *  lpChangeBlockLockAccessParams,
LPACCESS_FILTER  lpAccessFilter,
LPANTENNA_INFO  lpAntennaInfo,
LPVOID  rsvd 
)

This function changes the Block-Lock flags of a particular BlockGroup on one or 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] lpChangeBlockLockAcessParams 
Pointer to FUJITSU_CHANGE_BLOCKLOCK_ACCESS_PARAMS structure containing the BlockGroup's offset and password,Payload Mask and Action which determine the desired states of the sixteen Block-Lock flags.
[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_CHANGE_BLOCKLOCK_FAILED Failed to change WordLock flags on the specified tag(s)

Remarks:
When the proper BlockGroup Password is provided,it can set the BlockLock status of upto 16 Blocks inside the given BlockGroup. Once a Block is Block-locked, its enclosing words become Write-locked after being written once.
See also:
See RFID_FujitsuReadBlockLock,RFID_FujitsuChangeBlockOrAreaGroupPassword
Remarks:
Example:
// Code Snippets for setting/resetting wordLock flags
   UINT8 fujitsu64KtagID[12] = {0x30,0x35,0x30,0x7B,0x28,0x31,0xB3,0X80,0xB0,0x00,0x0C,0x4C};
   UINT8 writeData[2] = {0xff,0xff};
   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_CHANGE_BLOCKLOCK_ACCESS_PARAMS fujitsuChangeBlockLockAccessParams;
                        fujitsuChangeBlockLockAccessParams.blockGroupPassword = 0x12345678; 
                        fujitsuChangeBlockLockAccessParams.blockGroupOffset = 0x01;
                        fujitsuChangeBlockLockAccessParams.payloadAction = 0x7777; // Blocks at 0,4,8,12 indexes inside the BlockGroup-1 are Block-locked.The rest of the b are unlocked.
                        fujitsuChangeBlockLockAccessParams.payloadMask  = 0xffff;
                        rfidStatus = RFID_FujitsuChangeBlockLock(readerHandle,NULL,0,&fujitsuChangeBlockLockAccessParams,&accessFilter,NULL,NULL);
                        if(rfidStatus == RFID_API_SUCCESS)
                        {
                                
                           WRITE_ACCESS_PARAMS writeAccessParams;
                           writeAccessParams.accessPassword = 0;
                           writeAccessParams.pWriteData = writeData;
                           writeAccessParams.writeDataLength  = 2;
                           writeAccessParams.memoryBank = MEMORY_BANK_USER;
                           writeAccessParams.byteOffset = 2048;
                           RFID_Write(readerHandle, fujitsu64KTagID, 12, &writeAccessParams, NULL, NULL, NULL); // This Write Call succeeds
                           writeAccessParams.byteOffset = 2048;
                           RFID_Write(readerHandle,fujitsu64KTagID, 12, &writeAccessParams, NULL, NULL, NULL); // This Write Call fails

            }
            }
                   
           RFID_Disconnect(readerHandle);
   }


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