cookie CmReadUvd

Description

CmReadUvd reads the content of a UvD PIO of type 'data'. It is possible either to read the complete content of the PIO or parts of it.

tmr_02

Triple Mode Redundancy-related information (TMR)

  • C, C++
  • C#
  • Python

Syntax

int CMAPIENTRY CmReadUvd(HCMSysEntry hcmse, CMULONG flCtrl,
                 CMUSHORT usIndex, CMUSHORT usLogin,
                 CMULONG ulStart, CMULONG cbLength,
                 void *pbDest, CMULONG cbDest);

Parameter

hcmse contains an entry access handle opened by CmAccess2.

flCtrl holds a flag value, reserved for future use.

usIndex contains the index of the UvD PIO of type 'data'.

usLogin contains a 'login number'.

ulStart contains an offset, where to start reading the content. Starts with 0.

cbLength contains amount of data to be read.

pbDest contains the buffer to store the data.

cbDest contains the size of the output buffer.

Return

In the case of success, the amount of bytes read will be returned. If an error occurs, 0 is returned.

With the exception that if the given buffer was too small, the error code CMERROR_BUFFER_OVERFLOW is set and the required buffer size is returned.

Error codes may be as follows:

•CMERROR_INVALID_HANDLE, if the used entry access handle is invalid.

•CMERROR_WRONG_HANDLE_TYPE, if the type of the handle is not a entry handle e.g. a subsystem, box or Firm Item handle.

•CMERROR_INVALID_PARAMETER,

oif ulStart is bigger than the content size

oif cbLength == 0

oif pbDest == NULL and cbDest != 0

•CMERROR_OPTIONUNDEFINED, if the value specified in flCtrl is invalid.

•CMERROR_INDEXINVALID, if the specified index does not refer to a UvD PIO.

•CMERROR_PRODUCTITEMOPTIONINVALID,

oif the specified index does not refer to a UvD PIO of type 'data'.

oif the PIO status is invalid.

•CMERROR_INVALID_LOGIN, if the specified 'login number' is not in use.

•CMERROR_ACCESS_DENIED,

oif reading the content is password protected and the given 'login number' is not valid.

oif reading the content is not permitted at all.

oif reading the content does not require a password, but usLogin != 0.

•CMERROR_SESSION_EXPIRED, if the session used to create usLogin has expired.

•CMERROR_ENCRYPTIONINVALID, if decrypting the encrypted data returned by the CmContainer fails.

•CMERROR_WRONG_BOX_VERSION, .if the Firmware version of the CmContainer is too old.

•CMERROR_FUNCTION_NOT_SUPPORTED, if used with CmActLicense Firm Code or CmActLicense Universal Firm Code container.

Notes

Only CmDongle is supported. A Minimum CmDongle Firmware Version of 4.40 is required.

•If the UVD PIO is not password protected and writing content is allowed, usLogin must be 0.

•In order to obtain the size of the content of the UvD PIO cbDest == 0 can be used. In this case, pbDest can be NULL . No data will be read.

•In order to read the whole content without the knowledge of content size use ulStart == 0 and cbLength == (CMULONG)-1.

•If the given value of cbLength bigger than the content size, cbLength will be truncated to contentSize - ulStart.

No method available.

 

Not implemented.