CmEmbedded_4c_transp CmSecureDiscWrite

Description

CmSecureDiscWrite is used to write one or several sectors of a Secure Disk partition of a CmContainer.

information_weiss_klein26

For more details on the Secure Disk feature, please contact Wibu-Systems support.

  • C, C++
  • C#

Syntax

int CMAPIENTRY CmSecureDiscWrite(HCMSysEntry hcmse, CMULONG flCtrl, CM_DISC_STATUS *status, const CM_DISC_SECTOR *sector, const CMBYTE *data, CMUINT cbData);

Parameter

hcmse contains a handle opened by CmAccess2 (can be Box Access, Entry Access or Firm Item access).

flCtrl contains the flags available for reading operation of a secure disk partition:

nav_open CM_SECURE_DISC_WRITE writes sector(s) of a secure disk partition (0x00000202).

This flag can be or'ed with CM_SECURE_DISC_WRITE. 'Auto' is the default:

nav_open CM_SECURE_DISC_VERIFY_ON (0x00010000).

nav_open CM_SECURE_DISC_VERIFY_OFF (0x00020000).

nav_open CM_SECURE_DISC_VERIFY_AUTO (0x00000000).

These flags control whether after writing the sectors are read and compared with written sectors.

Default is CM_SECURE_DISC_VERIFY_AUTO, i.e depending on technical conditions a verify is performed. Currently, this is the case, if the file system is not FAT.

If the verify is not successful, the error CMERROR_VERIFY_FAILED (308) returns.

status contains contains information on the secure disk partition (see structure hmtoggle_plus1 CM_DISC_STATUS).

sector contains the sector specification of the secure disk partition (see structure hmtoggle_plus1 CM_DISC_SECTOR).

data contains the sector information.

cbData contains the length of data in bytes.

 

Return

If the functions fails, a value of 0 is returned.

Notes