Commit 0c837bc7001adab47635b19d24adeb7be8aa40a7

Authored by perry.werneck@gmail.com
1 parent 67279f8a

Trabalhando na implementacao HLLAPI - Ainda esta apresentando segfaults ao devolver uma string ao VB

src/include/pw3270/hllapi.h
@@ -63,7 +63,7 @@ extern "C" { @@ -63,7 +63,7 @@ extern "C" {
63 63
64 #ifdef _WIN32 64 #ifdef _WIN32
65 // http://www.mingw.org/wiki/Visual_Basic_DLL 65 // http://www.mingw.org/wiki/Visual_Basic_DLL
66 - __declspec (dllexport) int __stdcall hllapi(const unsigned long *func, char *str, unsigned short *length, unsigned short *rc); 66 + __declspec (dllexport) int __stdcall hllapi(LPWORD func, LPSTR str, LPWORD length, LPWORD rc);
67 #else 67 #else
68 LIB3270_EXPORT int hllapi(const unsigned long *func, char *str, unsigned short *length, unsigned short *rc); 68 LIB3270_EXPORT int hllapi(const unsigned long *func, char *str, unsigned short *length, unsigned short *rc);
69 #endif // _WIN32 69 #endif // _WIN32
src/plugins/remotectl/hllapi.c
@@ -143,7 +143,7 @@ @@ -143,7 +143,7 @@
143 } 143 }
144 144
145 #ifdef _WIN32 145 #ifdef _WIN32
146 - __declspec (dllexport) int __stdcall hllapi(const unsigned long *func, char *str, unsigned short *length, unsigned short *rc) 146 + __declspec (dllexport) int __stdcall hllapi(LPWORD func, LPSTR str, LPWORD length, LPWORD rc)
147 #else 147 #else
148 LIB3270_EXPORT int hllapi(const unsigned long *func, char *str, unsigned short *length, unsigned short *rc) 148 LIB3270_EXPORT int hllapi(const unsigned long *func, char *str, unsigned short *length, unsigned short *rc)
149 #endif // _WIN32 149 #endif // _WIN32
@@ -221,7 +221,7 @@ @@ -221,7 +221,7 @@
221 *ptr = '.'; 221 *ptr = '.';
222 } 222 }
223 223
224 - fprintf(arq,"func: %ld\nresult: %d\nrc: %d\nLength: %d\nstring: [%s]\n",*func,result,*rc, *length, str); 224 + fprintf(arq,"func: %d\nresult: %d\nrc: %d\nLength: %d\nstring: [%s]\n",*func,result,*rc, *length, str);
225 fclose(arq); 225 fclose(arq);
226 } 226 }
227 #endif // DEBUG 227 #endif // DEBUG