Skip to content

Instantly share code, notes, and snippets.

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
@phasis68
phasis68 / daemon.rb
Last active December 18, 2015 09:29
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