[#2529] concerns about Proc,lambda,block — "David A. Black" <dblack@...>

Hi --

39 messages 2004/03/01
[#2531] Re: concerns about Proc,lambda,block — ts <decoux@...> 2004/03/01

>>>>> "D" == David A Black <dblack@wobblini.net> writes:

[#2533] Re: concerns about Proc,lambda,block — "David A. Black" <dblack@...> 2004/03/01

Hi --

[#2537] Re: concerns about Proc,lambda,block — matz@... (Yukihiro Matsumoto) 2004/03/01

Hi,

[#2542] Re: concerns about Proc,lambda,block — Mathieu Bouchard <matju@...> 2004/03/02

[#2545] Re: concerns about Proc,lambda,block — matz@... (Yukihiro Matsumoto) 2004/03/02

Hi,

[#2550] Re: concerns about Proc,lambda,block — Mauricio Fern疣dez <batsman.geo@...> 2004/03/03

On Wed, Mar 03, 2004 at 07:51:10AM +0900, Yukihiro Matsumoto wrote:

[#2703] Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...>

This patch adds support to Net::POP for doing POP over SSL. Modeled on how

19 messages 2004/03/27
[#2704] Re: Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...> 2004/03/27

This is v2 of the patch. Cleaned up a bit and added some more docs.

[#2707] Re: Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...> 2004/03/28

v3 of the patch:

[#2721] Re: Proposed patch to add SSL support to net/pop.rb — Minero Aoki <aamine@...> 2004/03/30

Hi,

Re: Accessing DLL from Ruby

From: "Bob Calco" <bobcalco@...>
Date: 2004-03-03 04:19:31 UTC
List: ruby-core #2548
V.V.:

 

This is because VB dll's are ActiveX dlls; they adhere to the COM binary
specification, and do not export their functions via the C calling
convention (cdecl). You would do well to register the VB dll (regsvr32.exe
<dllname> at the command line), find its program ID (for instance, MS Word's
is "Word.Application") - something you can do either by searching the
registry, or by selecting it from the available list inside of MS Office VBA
development environment (Go to Tools->References, a list of all registered
COM servers will magically appear; one of them should be your prjCalc.dll if
you successfully registered it).

 

The point is, once you get the VB DLL's Program ID, you can do this instead
in Ruby:

 

require 'win32ole'

 

MyDLL = WIN32OLE.new("<program_id>")

res = MyDLL.calc(<number>)

puts res.to_s

 

-          Bob Calco

 

  _____  

From: V KANETKAR [mailto:v_kanetkar@datamatics.com] 
Sent: Tuesday, March 02, 2004 10:56 PM
To: ruby-core@ruby-lang.org
Subject: Accessing DLL from Ruby

 

I have a problem:

I am trying to call a function from a Visual Basic DLL. I wrote following
code but Ruby gave error.

I need to resolve this and need expert Ruby?windows help.

 


#Ruby Program to load dll(Just loading)
require 'Win32API'
dllcalc=Win32API.new("E:\\download\\sudha\\prjCalc.dll","calc",["I"],'I')

 


# Error 

 

>ruby dmapi.rb
dmapi.rb:2:in `initialize': GetProcAddress: calc or calcA (RuntimeError)
 from dmapi.rb:2:in `new'
 from dmapi.rb:2
>Exit code: 1

 

 

 

# The Visual Basic Code for the dll. Contains only one function calc.
Returns integer, i/p is one integer
# Works OK in VB. The dll was registered in Registry: same error.

 

Public Function calc(intVal1 As Integer) As Integer
    calc = -intVal1
End Function

 

 

 


# A similar example given in "Pragmatic Programmer"  works finr!

 

# Please Help

 

V V Kanetkar

In This Thread