cookie CmEnablingWriteApplicationKey

Description

CmEnablingWriteApplicationKey adds/attaches/updates/detaches/deletes the access code to the CmContainer.

tmr_02

Triple Mode Redundancy-related information (TMR)

  • C, C++
  • C#
  • Python

Syntax

int CMAPIENTRY CmEnablingWriteApplicationKey(HCMSysEntry hcmse, CMULONG flCtrl, void *pvCtrl, CMUINT cbCtrl)

Parameter

hcmse contains a handle opened by CmAccess / CmAccess2 (can be Box Access or Entry Access).

flCtrl contains one of the following operation commands:

nav_open CM_EW_ADD adds a new Enable Block Item to a Firm Item. The input parameters are provided in the hmtoggle_plus1CMENABLING_WRITEADD) structure. The return value of the function is the index of the created Enable Block Item in the Enable Block Table. If no Enable Block Item is created, then 0 is returned and an error code is set.

nav_open CM_EW_ATTACH attaches an existing Enable Block Item to a Firm Item or Product Item. The input parameters are provided in a hmtoggle_plus1 CMENABLING_WRITEATTACHDETACH structure. The return value of the function is 1 (TRUE), if no error occurred, else 0 (FALSE).

nav_open CM_EW_UPDATE updates the contents of an existing Enable Block Item. The input parameters are provided in a byte array (pointer to unsigned char). The return value is 1 (TRUE), if  if no error occurred, else 0 (FALSE).

nav_open CM_EW_DETACH detaches an existing Enable Block Item from a Firm Item or Product Item. The input parameters are provided in a CMENABLING_WRITE_ATTACH structure. The return value is 1 (TRUE), if no error occurred, else 0 (FALSE).

nav_open CM_EW_DELETE deletes an existing Enable Block Item in a Firm Item. The input parameters are provided in a hmtoggle_plus1 CMENABLING_WRITEDELETE structure. The return value is 1 (TRUE), if no error occurred, else 0 (FALSE).

pvCtrl contains the key information to add/attach/update/detach/delete in the CmContainer. The required structures can be obtained from the flag descriptions above. Parts of the input structures are encrypted.

cbCtrl contains the length of data stored in pvCtrl.

Return

The return values depend on the set flag in flCtrl. Please refer to the individual flag descriptions.

Syntax

public int CmEnablingWriteApplicationKey (HCMSysEntry hcmse, CmEnablingWriteApplicationKeyOption Option, object Ctrl)

}

Parameter

hcmse contains a handle opened by CmAccess / CmAccess2 (can be Box Access or Entry Access).

CmEnablingWriteApplicationKeyOption.Option contains one of the following operation commands:

nav_open Add adds a new Enable Block Item to a Firm Item. The input parameters are provided in the hmtoggle_plus1 CmEnablingWriteAdd class. The return value of the function is the index of the created Enable Block Item in the Enable Block Table. If no Enable Block Item is created, then 0 is returned and an error code is set.

nav_open ATTACH attaches an existing Enable Block Item to a Firm Item or Product Item. The input parameters are provided in a hmtoggle_plus1 CmEnablingWriteAttachDetach class. The return value of the function is 1 (TRUE), if no error occurred, else 0 (FALSE).

nav_open Update updates the contents of an existing Enable Block Item. The input parameters are provided in a byte array (pointer to unsigned char). The return value is 1 (true), if no error occurred, else 0 (false).

nav_open Detach detaches an existing Enable Block Item from a Firm Item or Product Item. The input parameters are provided in a CmEnablingWriteAttachDetach structure. The return value is 1 (true), if no error occurred, else 0 (false).

nav_open Delete deletes an existing Enable Block Item in a Firm Item. The input parameters are provided in a hmtoggle_plus1 CmEnablingWriteDelete class. The return value is 1 (true), if no error occurred, else 0 (false).

nav_open CmdMask allows to use a bit mask for Enable Block Item operations.

Ctrl contains the key information to add/attach/update/detach/delete in the CmContainer. The required structures can be obtained from the flag descriptions above. Parts of the input structures are encrypted.

Return

The return values depend on the set flag in CmEnablingWriteApplicationKeyOption.Option. Please refer to the individual flag descriptions.

 

Not implemented.