Takaaki Tateishi wrote:

> "h" or "H" are for the short data types.

Thanks. I found that in the DL docs
(http://www.ruby-doc.org/stdlib/libdoc/dl/rdoc/classes/DL/Types.html)
earlier today. I finally got this put together. The return type of the
method call is a long value. Previously I had used an integer value.
Then I had to make the call's first parameter (acsHandle) a pointer
value. Before I had totally left this parameter out. That's why the -2
return code was coming back. This translates to 'bad parameter.' Here's
my working code now:

---------------------------------------
require 'dl'
csta=DL.dlopen('csta32.dll')
openStream=csta['acsOpenStream', 'LPILISSSSISHHHHS']
acsHandle=[0].pack('L').to_ptr
invokeIdType=1
invokeId=0
streamType=1
serverId="AVAYA#MERLIN#CSTA#MERLIN-CTI\000"
loginId="username\000"
passwd="password\000"
applicationName="CTI Test\000"
acsLevelReq=1
apiVer="TS1-2\000"
sendQSize=0
sendExtraBufs=0
recvQSize=0
recvExtraBufs=0
privateData="VERSION\000"

resultCode=openStream.call(acsHandle,invokeIdType,invokeId,streamType,serverId,loginId,passwd,applicationName,acsLevelReq,apiVer,sendQSize,sendExtraBufs,recvQSize,
recvExtraBufs,privateData)
p resultCode[0]
--------------------------------------
Once I get all of this written I plan to share it with anyone who is
interested. It will be a working Ruby CTI envionment that works with
TSAPI-compliant elements. Not sure of the interest level, but I for one
will be glad to see it all come together :-)

Thanks for your replies!