Reference Codebot.Unique.pas
Part of the Codebot package
The Codebot.Unique unit ensures that only one instance of a program runs at a time. TUniqueInstance detects whether another instance is already running by listening on a local port, and the original instance receives any messages sent by later instances. To use it, call UniqueInstance with a key, or with a string that is hashed into a key, when the program starts.
Items 8 items
| Name | Kind | Line |
|---|---|---|
| TMessageEvent | procedural | 24 |
| TUniqueInstance | class | 32 |
| Create | constructor | 44 |
| Destroy | destructor | 45 |
| SendMessage | procedure | 47 |
| OnMessage | property | 52 |
| Original | property | 49 |
| UniqueInstance | function | 56, 58 |