Using Ruby /DL to invoke function in custom dll

Discussion in 'Ruby' started by sumeet90, Jun 7, 2012.

  1. sumeet90

    sumeet90

    Joined:
    Jun 7, 2012
    Messages:
    1
    Likes Received:
    0
    Hi,
    I have used following code to invoke function from my custom dll
    ...................................
    require 'dl'
    require 'dl/import'
    require 'dl/types'

    module My
    extend DL::Importable
    dlload "unit.dll"
    extern 'int BII_Initialize_Socket_Communications'
    extern 'int BII_Open_TCPIP_Communications(char,unsigned short)'

    end
    My.BII_Initialize_Socket_Communications()
    test = My.BII_Open_TCPIP_Communications("15.15.200.55",10001)

    But its give me error like undefined method and
    `symbol': can't find the symbol
     
    sumeet90, Jun 7, 2012
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.