[Win32utils-devel] win32-service configure description

Daniel Berger djberg96 at gmail.com
Tue Jun 18 18:37:27 UTC 2013


For some reason with the current FFI code, I'm picking up junk characters
when I read back the service description after setting it:

Failure:
test: configuring the description works as
expected(TC_Win32_Service_Configure)
c:/Users/djberge/Repositories/win32-service/test/test_win32_service_configure.rb:59:in
`block i
n <class:TC_Win32_Service_Configure>'
     56:   test "configuring the description works as expected" do
     57:     assert_equal('', full_info.description)
     58:     service_configure(:description => 'test service')
  => 59:     assert_equal('test service', full_info.description)
     60:   end
     61:
     62: =begin
<"test service">(US-ASCII) expected but was
<"\x84\xC2\xFE\x02test service">(ASCII-8BIT)

The relevant code is in the Service.configure method, around line 550.

description = SERVICE_DESCRIPTION.new
description[:lpDescription] =
FFI::MemoryPointer.from_string(opts['description'])

What's wrong with that?

Regards,

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20130618/c625bbb3/attachment.html>


More information about the win32utils-devel mailing list