[Win32utils-devel] Re: win32-service ideas

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Mon Jan 26 03:37:58 EST 2004


> Oh, you have wrong version of service.c
> I will attach service.c for you.

Sorry again ;-(

This is with the new service.c you attached and 
slightly modified test2.rb:
C:\extract\_ruby\WIN32-~1.2>ruby extconf.rb
creating Makefile


Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        cl -nologo -MD -Zi -O2b2xg- -G6 -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I.  -I. -I./.. -I./../missing -c -Tcservice.c
        cl -nologo -LD -Feservice.so service.obj msvcrt-ruby18.lib  oldnames.lib user32.lib advapi32.lib wsock32.lib  -link -incremental:no -pdb:none -dll -libpath:"c:/ruby/lib" -def:service.def
   Creating library service.lib and object service.exp

C:\extract\_ruby\WIN32-~1.2>ruby test\tc_service.rb
   This test will stop and start your Clipboard service, as well as pause and
   resume your Schedule service.  This is harmless unless you are actually
   using these services at the moment you run this test.  Is it OK to
   proceed? (y/N)
This will take a few seconds.  Be patient...
Loaded suite test/tc_service
Finished in 16.183 seconds.

24 tests, 66 assertions, 2 failures, 0 errors

C:\extract\_ruby\WIN32-~1.2>nmake site-install

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

install -c -p -m 0755 service.so c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/win32

C:\extract\_ruby\WIN32-~1.2>cd test

C:\extract\_ruby\WIN32-~1.2\test>dir *.rb
 Volume in drive C has no label.
 Volume Serial Number is 6B0E-6992

 Directory of C:\extract\_ruby\WIN32-~1.2\test

01/15/2004  07:07 AM             7,394 tc_service.rb
01/15/2004  07:07 AM             1,987 test.rb
01/25/2004  09:47 PM             1,241 test2.rb
               3 File(s)         10,622 bytes
               0 Dir(s)  21,345,996,800 bytes free

C:\extract\_ruby\WIN32-~1.2\test>ruby test2.rb install
 (Win32ServiceError)te_service': The specified service already exists.
        from test2.rb:10

C:\extract\_ruby\WIN32-~1.2\test>tp test2.rb

        here I modified the test2.rb and changed the name of the service
        to "Sample_Svc1" to avoid name conflict

C:\extract\_ruby\WIN32-~1.2\test>ruby test2.rb install

C:\extract\_ruby\WIN32-~1.2\test>ruby test2.rb start
 (Win32ServiceError)t': Overlapped I/O operation is in progress.
        from test2.rb:19

C:\extract\_ruby\WIN32-~1.2\test>ruby -v
ruby 1.8.0 (2003-08-04) [i386-mswin32]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/win32utils-devel/attachments/20040126/6c09de81/attachment.htm

More information about the win32utils-devel mailing list