From: Eleanor McHugh Date: 2009-07-15T05:00:40+09:00 Subject: Re: Using DLLs with my Ruby app On 14 Jul 2009, at 19:53, Gin Mendi wrote: > Thanks for the replies! > > Yes I tried out both: > > 1) extern "void _serverLogon(string, string, string, void, void)" > - which results to a "cannot find symbol" error. > > and > > 2) extern "void _serverLogon@20(string, string, string, void, void)" > - which results to a "can't parse the function prototype" error. I'm not on a Windows box so I can't easily test how dll function signatures work, however I suspect the problem is with extern not supporting the '@' embedded in the function signature. As an alternative you can try the following: require 'dl' dll = DL.dlopen(‘myAPI.dll’) server_logon = dll[‘_serverLogon’, ‘0SSS00’] server_logon.call ... where the 0s indicate a void pointer, and ... is replaced with your parameter list. Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason