Contents - Index
If you call the CheckLicence method, you put Sheriff into "Automatic Mode". Under the Automatic Mode, Sheriff checks the status of the current licence and fire up appropriate messages whenever it is needs to. The application only needs to handle these message appropriately. Automatic Mode is easy to understand and implement and most of developers will want to use the Automatic Mode. However, some applications might have a protection requirement that is more complicated that that provided by Automatic Mode. These applications may need to control the time a licence should be issued and perhaps to perform some complicated tasks that make using Automatic Mode unsuitable. If this is the case for your application, then the Advanced Mode is what you need.
The key difference between the Automatic Mode and Advanced Mode lies in the call to the CheckLicence method: Automatic Mode calls this method to start, whereas Advanced Mode never calls this method.
Another difference you might notice is that Sheriff handles the heartbeating automatically under Automatic Mode. In fact, Sheriff does fire up an OnHeartbeat message on every heartbeat. Usually, there is no need for the application to handle this message. On the Advanced Mode, however, the application has to handle the heartbeating. This is usually done by inserting a timer control and call the UpdateLicence method on the event of timer message.
Should you decide to use the Advanced Mode, you may want to read the topic "Developer's Guide" for a complete knowledge of how it works and what procedures needed to follow. Although some of the methods are slightly different in name, the general principle is the same. A complete list of methods, events and properties are listed in the topic "Technical Reference". A demo project in VB 6.0 is also provided.