cookie CmEnablingGetChallenge

Description

CmEnablingGetChallenge gets the challenge (Session ID) out of the CmContainer, which must be enabled/disabled. This challenge is a random number created by the CmContainer.

tmr_02

Triple Mode Redundancy-related information (TMR)

  • C, C++
  • C#
  • Python

Syntax

int CMAPIENTRY CmEnablingGetChallenge(HCMSysEntry hcmse, CMENABLING_APPCONTEXT *pcmAppContext, CMBYTE *pbChallenge, CMUINT cbChallenge)

Parameter

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

pcmappcontext contains all information needed to enable/disable a CmContainer/entry (see the structure hmtoggle_plus1 CMENABLING_APPCONTEXT).

pbChallenge contains the buffer for the challenge.

cbChallenge contains the buffer length of pbChallenge.

Return

The length of the returned challenge is returned. If an error occurred, the value 0 is returned and an error code is set. If pbChallenge does not contain enough memory, the amount of required bytes will be returned. In this case, the return value is larger than the cbChallenge parameter and error code CMERROR_BUFFER_OVERFLOW is set.

Notes

The challenge received by the CmContainer is valid for 180 seconds. If the response to this challenge is sent after that period, an error is returned.

Syntax

public bool CmEnablingGetChallenge(HCMSysEntry hcmse, CmEnablingAppContext AppContext, out byte[] Challenge)

Parameter

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

AppContext contains all information needed to enable/disable a CmContainer/entry (see the class hmtoggle_plus1 CmEnablingAppContext).

Challenge contains the challenge.

Notes

The challenge received by the CmContainer is valid for 180 seconds. If the response to this challenge is sent after that period, an error is returned.

 

Not implemented.