Index: lib/tmpdir.rb =================================================================== --- lib/tmpdir.rb (revision 22794) +++ lib/tmpdir.rb (working copy) @@ -16,7 +16,7 @@ max_pathlen = 260 windir = "\0"*(max_pathlen+1) begin - getdir = Win32API.new('shell32', 'SHGetFolderPath', 'LLLLP', 'L') + getdir = Win32API.new('shell32', 'SHGetFolderPath', 'LLLLP', 'L', :stdcall) raise RuntimeError if getdir.call(0, CSIDL_LOCAL_APPDATA, 0, 0, windir) != 0 windir.rstrip! rescue RuntimeError