Callbacks for external libraries

Discussion in 'Rebol' started by Absolutely, May 31, 2010.

  1. Absolutely

    Absolutely New Member

    Hello there,
    I am wondering if it is possible to use external libraries that exhibit a callback interface. Has anybody some sample code that shows how to do this?
    Many thanks in advance,
    -Tom
  2. MaxV

    MaxV Member

    Well, I don't know what you means for external libraries with callback interface, because you can:

    call external rebol files, so you create one or more "externaLib.r" file like:
    Code:
    Rebol [title "externaLib"]
    myspecialfunc: func [ a b] [ a + b]
    
    and you can call it/them in the main program:

    Code:
    do %externaLib.r
    total: myspecialfunc 5 17
    
    OR you can call external programs:
    Code:
    call/wait  "pdftohtml   myfile "
    
    These are some examples..

    See rebgui at http://www.dobeash.com/rebgui.html for more information about external libraries
  3. Absolutely

    Absolutely New Member

    MaxV,
    thanks for the quick response, and sorry that I wasn't clearer.
    I am rather talking about an external dll which, if I was using it with C, provides me functions that take a pointer to a callback function. Would that dll be usable from within REBOL without using any additional C layer or something?
    Thanks,
    -Tom
  4. Graham

    Graham Developer Staff Member

  5. notchent

    notchent Member

  6. Absolutely

    Absolutely New Member

    Guys,
    thank you very very much for your feedback.
    Regards,
    -Tom

Share This Page