CmGetRemoteContextBuffer
Description
This function operates like CmGetRemoteContext() but uses a pre-allocated memory buffer instead of a file pointer.
|
For CmDongle only a local access is allowed. CmActLicense cover accesses locally or via LAN. |
Syntax
int CMAPIENTRY CmGetRemoteContextBuffer(HCMSysEntry hcmBox, CMUINT flCtrl, CMUINT *pulFirmCodes, CMUINT cbFirmCodes, void* pvMemBuffer, CMUINT cbMemBuffer, CMUINT* pcbWritten);
Parameter
hcmBox contains a handle opened by CmAccess2.
flCtrl reserved for future purposes.
pulFirmCodes points to a set of Firm Codes to reserve.
cbFirmCodes holds the number of Firm Codes in pulFirmCodes.
pvMemBuffer pointer to memory to hold the data.
cbMemBuffer holds the size of pvMemBuffer.
pcbWritten receives the number of bytes written to pvMemBuffer. If the number of bytes given in cbMemBuffer is too small to receive the complete context, the number of necessary bytes is written to pcbWritten.
Return
Returns the number of Firm Items stored in the Context File *.WibuCmRaC memory buffer. If pvDest does not contain enough memory, the number of needed bytes will be written to pcbWritten. In this case the return value is larger than the cbDest parameter and error code CMERROR_BUFFER_OVERFLOW is set.
Notes
If a Firm Item with the specified Firm Code does not exist in the CmDongle, CmReserveFirmItem() will be called implicitly. The result will then be stored in the Context File *.WibuCmRaC memory buffer.