xhrb object/function in c/c++ routine - xharbour

This is a discussion on xhrb object/function in c/c++ routine - xharbour ; Hi, Is it possible to create xhrb object in C routine and pass it to a xharbour function as a parameter? I call xharbour function in C routine and want to pass an xhr object to it to be accesed ...

+ Reply to Thread
Results 1 to 2 of 2

xhrb object/function in c/c++ routine

  1. Default xhrb object/function in c/c++ routine

    Hi,

    Is it possible to create xhrb object in C routine and pass it to a xharbour
    function as a parameter?
    I call xharbour function in C routine and want to pass an xhr object to it
    to be accesed easily in xharbour.
    I'm succeed with passing an int or char* value but can't pass an object.



    I'd like to have something like below:

    ..cpp

    void cpp_function()
    {

    CREATE oxHrbClass object
    POPULATE oxHrbClass-> value with "changed value"
    CALL callback(xoHrbClass)

    }


    ..prg
    PROCEDURE CALLBACK ( oxHrbClass)
    ? oxHrbClass:value
    RETURN

    CLASS xHrbClass
    DATA value INIT "init value"
    ENDCLASS



    Thanks in advance for any tips
    Rafal



  2. Default Re: xhrb object/function in c/c++ routine

    Rafal,

    > Is it possible to create xhrb object in C routine and pass it to a
    > xharbour function as a parameter?
    > I call xharbour function in C routine and want to pass an xhr object to it
    > to be accesed easily in xharbour.
    > I'm succeed with passing an int or char* value but can't pass an object.


    All items are passed equally using the PHB_ITEM container. xHarbour sources
    are full of such samples.

    Ron



+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 11-22-2007, 02:17 AM
  2. Replies: 0
    Last Post: 11-15-2007, 04:15 AM
  3. Looking for a 2D Rational Function Interpolation routine
    By Application Development in forum Fortran
    Replies: 2
    Last Post: 10-16-2007, 04:49 PM
  4. Prototypes/Parameters to a Function/Sub-Routine
    By Application Development in forum Perl
    Replies: 17
    Last Post: 08-04-2007, 02:19 PM
  5. xHRB 0.71 binary release ??
    By Application Development in forum xharbour
    Replies: 2
    Last Post: 05-23-2007, 05:21 PM