[Gambas-user] CallBack from external library

martin p cristia tercoide at hotmail.com
Thu Feb 18 15:45:00 CET 2021


It is possible. I've done it.

In C:

long M8gauss(double *matriz, double *x, double * ti, long n , int 
*salir,   void (*cbGambas) (int) )
{

     if(n == 0)return 1;
     int i, i1, j, h, h1;
     //long ok = -1;
     //long contador = 0;
     double c1;
     // triangulacion

     for (i = 0;i<n;i++)
     {
         i1=i*n;
         //*porcentaje = i/n;
         if(*salir == -1)return i;

         // CALL THE GAMBAS SUB
         cbGambas(i);

In Gambas:

Library "libmatrix8-0.0.2"
Public Extern M8gauss(mfMatriz As Float[], vfIncognitas As Float[], 
vfTerminosInd As Float[], lOrden As Long, cancelar As Pointer, 
CallbackFunction As Pointer) As Long


El 2/18/21 a las 11:23 AM, user-request at lists.gambas-basic.org escribió:
>   CallBack from external library

-- 
Saludos

Ing. Martin P Cristia



More information about the User mailing list