/// <summary>
        /// Deactivates the license activation and frees up the corresponding activation
        /// slot by contacting the Cryptlex servers.
        ///
        /// This function should be executed at the time of de-registration, ideally on
        /// a button click.
        /// </summary>
        /// <returns>LA_OK, LA_FAIL</returns>
        public static int DeactivateLicense()
        {
            int status = IntPtr.Size == 4 ? LexActivatorNative.DeactivateLicense_x86() : LexActivatorNative.DeactivateLicense();

            switch (status)
            {
            case LexStatusCodes.LA_OK:
                return(LexStatusCodes.LA_OK);

            case LexStatusCodes.LA_FAIL:
                return(LexStatusCodes.LA_FAIL);

            default:
                throw new LexActivatorException(status);
            }
        }