Example of a Function call in C syntax

 

 

/************************************************************************/

/*               Sample of a GeoDLL function call in C++                */

/*                                                                      */

/*                 Author: Killet GeoSoftware Ing.-GbR                  */

/*                                                                      */

/*    In the calling directory of the program the files geodll32.dll    */

/*                  and geodllbn.bin must be present.                   */

/************************************************************************/

 

if ((hInstance  =::LoadLibrary("GeoDLL32.dll")) != NULL)

    if ((pTrans = (long int (_stdcall *) (double,double,short int,

    short int,short int,double *,double *,short int,short int,short int,

    short int))::GetProcAddress(hInstance,"coordtrans3")) != NULL)

      if (pTrans != NULL)

        l = pTrans(2540000.0,5650000.0,2,1,0,&nKoordXZ,&nKoordYZ,1,1,1,0);

    else

      LastError = GetLastError();

  else

    LastError = GetLastError();