• Viernes 19 de Abril de 2024, 01:07

Autor Tema:  Llamar A Una Api Y Pasar Parametros C++  (Leído 1366 veces)

edguardini

  • Nuevo Miembro
  • *
  • Mensajes: 1
    • Ver Perfil
Llamar A Una Api Y Pasar Parametros C++
« en: Lunes 22 de Marzo de 2004, 14:42 »
0
Disculpen la molestia, desde fox tengo que llamar a una funcion de una dll cuyo codigo C es el descripto mas abajo, agradecere me den una pista o me digan como convertir a fox los parametros a pasarle.



Saludos y gracias



Edgardo Guardini

Buenos Aires - Argentina



/*! Main function of mhsrcv

* \return 0 on success, otherwise the value of status from X400 call

*/

int main () {

char buffer[BUFSIZ];

char pa[BUFSIZ];

int status;

int nummsg;

int type;

int seqn;

struct X400msSession *sp;

struct X400Message *mp;

struct X400Recipient *rp;

int n;

int length;

int contype;



/* Prompt for password; note: reflected. */

printf ("Password: ");

if ( fgets (buffer, sizeof buffer, stdin) == NULL )

exit (1);



if ( buffer[strlen(buffer)-1] == '\n' )

buffer[strlen(buffer)-1] = '\0';



printf("Presentation Address: ");

fgets (pa, sizeof pa, stdin);



if ( pa[strlen(pa)-1] == '\n' )

pa[strlen(pa)-1] = '\0';



printf("Connection type (0 = P7, 1 = P3): ");

contype = fgetc(stdin);

if ((contype != '0') && (contype != '1'))

exit(1);


contype -= '0';


status = X400msOpen (contype, buffer, pa, &nummsg, &sp);

if ( status != X400_E_NOERROR ) {

fprintf (stderr, "Error in Open: %s\n", X400msError (status));

exit (status);