Chilkat HOME Android™ Classic ASP C C++ C# Mono C# .NET Core C# C# UWP/WinRT DataFlex Delphi ActiveX Delphi DLL Visual FoxPro Java Lianja MFC Objective-C Perl PHP ActiveX PHP Extension PowerBuilder PowerShell PureBasic CkPython Chilkat2-Python Ruby SQL Server Swift 2 Swift 3/4 Tcl Unicode C Unicode C++ Visual Basic 6.0 VB.NET VB.NET UWP/WinRT VBScript Xojo Plugin Node.js Excel Go
(Ruby) Demonstrates UnlockComponent for MailMan
Demonstrates how to unlock the Chilkat MailMan functionality. The UnlockComponent method should be called once at the beginning of the program. Once unlocked, all subsequent MailMan objects are created in the unlocked state. There is no need to call UnlockComponent for every instance of a Chilkat MailMan object.
The object that called UnlockComponent may be discarded (deleted, deallocated, etc.). It does not need to remain in existence for subsequent objects to be already unlocked when created.
require 'chilkat' mailman = Chilkat::CkMailMan.new() # If a license is purchased, replace "Anything for 30-day trial" with the purchased unlock code. success = mailman.UnlockComponent("Anything for 30-day trial") if (success != true) print mailman.lastErrorText() + "\n"; print "unlock failed." + "\n"; exit end # Starting in Chilkat v184.108.40.206, the UnlockStatus method was added to the Global object. # It indicates the unlocked status for the last call to UnlockBundle, # or any UnlockComponent call. The possible values are: # # 0 -- Not unlocked. (Still in locked state.) # 1 -- Unlocked with in fully-functional trial mode. # 2 -- Unlocked using a valid purchased unlock code. # A program can check by instantiating the Global object and then examining # the UnlockStatus glob = Chilkat::CkGlobal.new() if (glob.get_UnlockStatus() == 2) print "Unlocked using a purchased unlock code." + "\n"; else print "Unlocked using an arbitrary string for trial mode." + "\n"; end
© 2000-2019 Chilkat Software, Inc. All Rights Reserved.