public byte[] GetOperationState()
{
if (this._disposed)
throw new ObjectDisposedException(this.GetType().FullName);
ulong operationStateLen = 0;
CKR rv = _p11.C_GetOperationState(_sessionId, null, ref operationStateLen);
if (rv != CKR.CKR_OK)
throw new Pkcs11Exception("C_GetOperationState", rv);
byte[] operationState = new byte[operationStateLen];
rv = _p11.C_GetOperationState(_sessionId, operationState, ref operationStateLen);
if (rv != CKR.CKR_OK)
throw new Pkcs11Exception("C_GetOperationState", rv);
return operationState;
}