From: Austin Ziegler Date: 2005-05-20T06:07:50+09:00 Subject: Re: Win32API question - pathstriptoroot On 5/19/05, Berger, Daniel 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