I have very little experience with dl. But I want to use it to
call SetEnvironmentVariable() from Win32. I could use FFI but cannot, since this
script will be supplied to a customer where it is difficult to install.
this is the error i get
D:/ruby/usr/lib/ruby/1.9.1/dl/import.rb:194:in `import_function': undefined
method `sym' for nil:NilClass (NoMethodError)
from D:/ruby/usr/lib/ruby/1.9.1/dl/import.rb:118:in `extern'
from test.rb:5:in `<module:Win32>'
from test.rb:3:in `<main>'
machine is WinXP
ruby 1.9.1 (2008-10-28 revision 19983) [i386-mswin32_80]
I can't help you with your issue, but I'm curious why it's necessary.
The MSDN page you link to says SetEnvironmentVariable is only for the
current process. Doesn't ENV do what you need?
On Fri, Jul 2, 2010 at 10:37 AM, Aston <blackapache512-ticket@yahoo.com> wrote:
Hello,
I have very little experience with dl. But I want to use it to
call SetEnvironmentVariable() from Win32. I could use FFI but cannot, since this
script will be supplied to a customer where it is difficult to install.
this is the error i get
D:/ruby/usr/lib/ruby/1.9.1/dl/import.rb:194:in `import_function': undefined
method `sym' for nil:NilClass (NoMethodError)
from D:/ruby/usr/lib/ruby/1.9.1/dl/import.rb:118:in `extern'
from test.rb:5:in `<module:Win32>'
from test.rb:3:in `<main>'
machine is WinXP
ruby 1.9.1 (2008-10-28 revision 19983) [i386-mswin32_80]
this is the error i get
D:/ruby/usr/lib/ruby/1.9.1/dl/import.rb:194:in `import_function': undefined
method `sym' for nil:NilClass (NoMethodError)
from D:/ruby/usr/lib/ruby/1.9.1/dl/import.rb:118:in `extern'
from test.rb:5:in `<module:Win32>'
from test.rb:3:in `<main>'
machine is WinXP
ruby 1.9.1 (2008-10-28 revision 19983) [i386-mswin32_80]
> this is the error i get
> D:/ruby/usr/lib/ruby/1.9.1/dl/importrb:194:in `import_function': undefined
> method `sym' for nil:NilClass (NoMethodError)
> from D:/ruby/usr/lib/ruby/1.9.1/dl/import.rb:118:in `extern'
> from test.rb:5:in `<module:Win32>'
> from test.rb:3:in `<main>'