From 0c837bc7001adab47635b19d24adeb7be8aa40a7 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Sat, 22 Sep 2012 21:43:47 +0000 Subject: [PATCH] Trabalhando na implementacao HLLAPI - Ainda esta apresentando segfaults ao devolver uma string ao VB --- src/include/pw3270/hllapi.h | 2 +- src/plugins/remotectl/hllapi.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/pw3270/hllapi.h b/src/include/pw3270/hllapi.h index a8a424f..5eb30d1 100644 --- a/src/include/pw3270/hllapi.h +++ b/src/include/pw3270/hllapi.h @@ -63,7 +63,7 @@ extern "C" { #ifdef _WIN32 // http://www.mingw.org/wiki/Visual_Basic_DLL - __declspec (dllexport) int __stdcall hllapi(const unsigned long *func, char *str, unsigned short *length, unsigned short *rc); + __declspec (dllexport) int __stdcall hllapi(LPWORD func, LPSTR str, LPWORD length, LPWORD rc); #else LIB3270_EXPORT int hllapi(const unsigned long *func, char *str, unsigned short *length, unsigned short *rc); #endif // _WIN32 diff --git a/src/plugins/remotectl/hllapi.c b/src/plugins/remotectl/hllapi.c index d14019a..722f311 100644 --- a/src/plugins/remotectl/hllapi.c +++ b/src/plugins/remotectl/hllapi.c @@ -143,7 +143,7 @@ } #ifdef _WIN32 - __declspec (dllexport) int __stdcall hllapi(const unsigned long *func, char *str, unsigned short *length, unsigned short *rc) + __declspec (dllexport) int __stdcall hllapi(LPWORD func, LPSTR str, LPWORD length, LPWORD rc) #else LIB3270_EXPORT int hllapi(const unsigned long *func, char *str, unsigned short *length, unsigned short *rc) #endif // _WIN32 @@ -221,7 +221,7 @@ *ptr = '.'; } - fprintf(arq,"func: %ld\nresult: %d\nrc: %d\nLength: %d\nstring: [%s]\n",*func,result,*rc, *length, str); + fprintf(arq,"func: %d\nresult: %d\nrc: %d\nLength: %d\nstring: [%s]\n",*func,result,*rc, *length, str); fclose(arq); } #endif // DEBUG -- libgit2 0.21.2