From: Daniel Berger Date: 2005-05-29T04:40:20+09:00 Subject: [Win32API] Need help with PathCreateFromUrl Hi all, Ruby 1.8.2 Windows XP The following script dies a horrible death. I've tried different ways of padding the url and buffer, but nothing has worked. Do I have the method signature wrong? # test.rb require "Win32API" MAX_PATH = 255 PathCreateFromUrl = Win32API.new("shlwapi", "PathCreateFromUrl", "PPLL", "L") buf = 0.chr * MAX_PATH url = "file:///C:/foo" + 0.chr # I tried other ways of padding this len = buf.length p PathCreateFromUrl.call(url, buf, len, 0) # kaboom! p buf Regards, Dan