예제 #1
0
        public CKR C_EX_FormatDrive(NativeULong slotId, NativeULong userType,
                                    byte[] pin, CK_VOLUME_FORMAT_INFO_EXTENDED[] initParams)
        {
            if (_disposed)
            {
                throw new ObjectDisposedException(GetType().FullName);
            }

            NativeULong pinLength = 0;

            if (pin != null)
            {
                pinLength = (NativeULong)(pin.Length);
            }

            NativeULong initParamsLength = 0;

            if (initParams != null)
            {
                initParamsLength = (NativeULong)(initParams.Length);
            }

            NativeULong rv = _rutokenDelegates.C_EX_FormatDrive(slotId, userType, pin, pinLength,
                                                                initParams, initParamsLength);

            return((CKR)rv);
        }