D
Daniel Berger
Hi all,
Ruby 1.8.2.
Windows XP Pro
I'm having a bit of an issue with an in/out variable with the
PathAppend() function. I have no problem when I use a C extension, but
when I used Win32API, I don't get the desired output. Here's the code:
# test.rb
require "Win32API"
PathAppend = Win32API.new("shlwapi","PathAppend","PP","L")
path = 'C:\foo'
PathAppend.call(path, 'bar')
p path # 'C:\foo', but expect 'C:\foo\bar'
I've tried padding 'path' and a few other tricks, but nothing has
worked. What am I doing wrong?
Regards,
Dan
Ruby 1.8.2.
Windows XP Pro
I'm having a bit of an issue with an in/out variable with the
PathAppend() function. I have no problem when I use a C extension, but
when I used Win32API, I don't get the desired output. Here's the code:
# test.rb
require "Win32API"
PathAppend = Win32API.new("shlwapi","PathAppend","PP","L")
path = 'C:\foo'
PathAppend.call(path, 'bar')
p path # 'C:\foo', but expect 'C:\foo\bar'
I've tried padding 'path' and a few other tricks, but nothing has
worked. What am I doing wrong?
Regards,
Dan