On 5/19/05, Berger, Daniel <Daniel.Berger / qwest.com> wrote:
> 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?

All PathStripToRoot is doing is putting \000 after C:\. Do an #inspect.

I'm not sure what the right answer is in this case.

-austin
-- 
Austin Ziegler * halostatue / gmail.com
               * Alternate: austin / halostatue.ca