This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOG_FILE = 'C:\\tmp\\win32_daemon_test.log' | |
begin | |
require 'rubygems' | |
require 'win32/daemon' | |
include Win32 | |
class DemoDaemon < Daemon | |
# This method fires off before the +service_main+ mainloop is entered. | |
# Any pre-setup code you need to run before your service's mainloop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ffi' | |
# The Win32 module serves as a namespace only. | |
module Win32 | |
# The Clipboard class encapsulates functions that relate to the MS Windows | |
# clipboard. | |
class Daemon | |
extend FFI::Library |