Hi all,

Windows XP Pro
Ruby 1.8.2

require "Win32API"

PathStripToRoot = Win32API.new("shlwapi","PathStripToRoot","P","L")
path = 'C:\foo\bar'

rv = PathStripToRoot.call(path)
puts "RV: #{rv}"
puts "Path is [#{path}]"

With that I end up with:

RV: 1
Path is [C:\ oo bar]

Do I need to encode and/or decode 'path' somehow first?

Regards,

Dan