From: Charlie Savage Date: 2009-03-02T03:58:32+09:00 Subject: [ruby-core:22613] [Bug #1230] ESP Stack Corruption on Windows Issue #1230 has been updated by Charlie Savage. Hi Nobu, Thanks for applying the patch. Two comments though. First, you changed: SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP', 'L' To: SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP', 'L', :stdcall But looking at Win32api it only takes 4 parameters in its initializer: def initialize(dllname, func, import, export = "0") So you can you pass the extra :stdcall? Second, since the windows api almost always uses the stdcall convention, it seems like changing win32api to assume that would be the right thing to do. Currently it assumes cdelc. Thoughts? Are you worried about backwards compatibility. What does Ruby 1.8.x do? Charlie ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1230 ---------------------------------------- http://redmine.ruby-lang.org