Hola
@Ale , te paso un ejemplo de como pasar parametros a la funciones.
Código COBOL:
WORKING-STORAGE SECTION.
01 Titulo-descripcion pic x(11) value "Descripcion".
01 Titulo-precio pic x(6) value "Precio".
01 Description pic x(15) value "Prueba de Venta".
01 Precio pic s9(9) COMP-5.
01 SALIDA-IMPRESOR pic s9(9) COMP-5 value 0.
Código CPP:
int IFOpParamSet (const char * name, const char * value)
Código COBOL:
*******************************************
* Descripcion
*************
move spaces TO FUNCION.
MOVE "IFOpParamSet" TO FUNCION.
CALL FUNCION WITH STDCALL USING BY REFERENCE Titulo-descripcion
BY REFERENCE Description
returning SALIDA-IMPRESOR.
Código CPP:
int IFOpParamIntSet (const char * name, int value)
Código COBOL:
*******************************************
* Precio
********
move spaces TO FUNCION.
move 123 TO Precio.
MOVE "IFOpParamIntSet" TO FUNC-SAM4-LIB.
CALL FUNCION WITH STDCALL USING BY REFERENCE Titulo-precio
BY VALUE Precio
returning SALIDA-IMPRESOR.
Saludos ....