anybody know why Net::SSH can't run in 1.9?

53 views
Skip to first unread message

rogerdpack

unread,
Aug 17, 2009, 3:00:28 PM8/17/09
to RubyInstaller
I got this issue from the Net::SSH maintainer...

http://github.com/net-ssh/net-ssh/issues#issue/5


C:/ruby/lib/ruby/1.9.1/dl/cparser.rb:104:in `parse_ctype': unknown
type: HWND (DL::DLError)
from C:/ruby/lib/ruby/1.9.1/dl/cparser.rb:53:in `parse_signature'
from C:/ruby/lib/ruby/1.9.1/dl/import.rb:116:in `extern'

Any thoughts?
-r

Luis Lavena

unread,
Aug 18, 2009, 12:46:38 AM8/18/09
to rubyin...@googlegroups.com

Net::SSH is using Win32API for Pageant Agent, Win32API has been marked
as "deprecated" after 1.9.0, but is back, yet still, you need to add
an additional parameter to indicate cdecl or stdcall calling
convention.

The agent code needs to be revised, even better if can be rewritten,
since is brittle.

Last time I had Windows Media Player open with an high bitrate OGG it
missed to find my loaded keys.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Roger Pack

unread,
Aug 20, 2009, 9:43:40 AM8/20/09
to rubyin...@googlegroups.com
>> C:/ruby/lib/ruby/1.9.1/dl/cparser.rb:104:in `parse_ctype': unknown
>> type: HWND (DL::DLError)
>> from C:/ruby/lib/ruby/1.9.1/dl/cparser.rb:53:in `parse_signature'
>> from C:/ruby/lib/ruby/1.9.1/dl/import.rb:116:in `extern'
>>
>> Any thoughts?
>
> Net::SSH is using Win32API for Pageant Agent, Win32API has been marked
> as "deprecated" after 1.9.0, but is back, yet still, you need to add
> an additional parameter to indicate cdecl or stdcall calling
> convention.

Are there any tutorials or examples of the cdecl/stdcall stuff that
you could recommend? [the ssh guy wanted to see an example :) ]
-r

Luis Lavena

unread,
Aug 20, 2009, 9:53:22 AM8/20/09
to rubyin...@googlegroups.com

No tutorials, the joy of Ruby-core API changes with lack of documentation.

Only source I remember:

http://rubygems.rubyforge.org/svn/trunk/lib/rubygems/config_file.rb

if RUBY_VERSION > '1.9' then
SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP',
'L', :stdcall
SHGetFolderPath.call nil, CSIDL_COMMON_APPDATA, nil, 1, path
else
SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP',
'L'
SHGetFolderPath.call 0, CSIDL_COMMON_APPDATA, 0, 1, path
end


Last parameter addition to Win32API.new and calling convention changes
for 0 instead of nil.

HTH,

Reply all
Reply to author
Forward
0 new messages